It should be simple - outside public IP, internal webserver, setup Hairpin NAT so that I can access domain from within the network - easy yes???
Obviously not for me - everything works OK from outside, can't use web browser to access domain from within network - but - can access the webpages by using internal IP of webserver (10.10.64.3), and can also ping domain name internally, just not access http. Have added static DNS as someone suggested that, but no good
Here are the ping's I tried...
ping <MY_DOMAIN.com>
Reply from <PUBLIC_IP>: bytes=32 time=2ms TTL=64
ping 10.10.64.3
Reply from 10.10.64.3: bytes=32 time=2ms TTL=64
Webserver lives at 10.10.64.3 in the same subnet as all the clients on Vlan5
Clients are all wireless via a Motorola RFS controller connected to bridge-local, getting addresses from dhcp-server in Routerboard on 10.10.64.0/19 subnet
Have tried every permutation that I can think of / find in the forums, and nothing will make the clients reach the webserver for html, only the ping works. I can ping the clients from the server too, so there’s definitely connectivity, just not the right kind!!
Tried that too - and all vlans are already associated to bridge-local - as I said, the server interface on vlan5 can ping the clients, and vice-versa, it’s only when I want to use port 80 (or any other port such as 443) that it doesn’t work - just concentrating on port 80 for http at the moment, will worry about the others when that’s fixed!!
By the way, Thanks for your swift replies efaden!!
Also is there anything in the forward table in the firewall? I’m working a 24 tomorrow, so my replies will be delayed. Also… maybe I am confused, but why does your dnat and snat rules not match… Your dnat goes to 10.10.1.3 and your snat is in the 10.10.64.3 range?
This is a very basic setup on a RB2011, so all the ports apart from ether1 are in the bridge-local. Incoming from ISP is on Ether1, wireless controller on eth7, webserver on Eth8
And I can ping the public IP just fine, as well as pinging the actual domain name - just no http!!
Below is my interface export - thanks again!!
-Nick
I think this is where the problem lies… your dst-nat goes to 10.10.1.3 and your src-nat is for the 10.10.64.0/19 range… Is your server 10.10.64.3 or is it 10.10.1.3?
It’s both - we have em2 on the server set as 10.10.64.3 for local monitoring (the server’s primary function is running Packetfence NAC), and 10.10.1.3 is on em1 of the server for outside access.
The functional issue we have is that Packetfence controls the clients - they associate on vlan2 to pass through authentication (public guest signup, with an emailed authentication link) - they then get moved to Vlan5 for 10 minutes, which gives them outside internet access to be able to open their email and click on the link - which is hosted on the local webserver, and therefore fails IF the link works, then they remain on vlan5 for the duration of their authorized access time, and are able to access locally hosted content as well as the outside interwebs.
I think I’ve tried every possible combination of dst-nat, src-nat, in, out, shake it all about, server addresses and not one thing has worked - it’s got to be something simple, but damned if I can find it!!
If I change the dst-nat to 10.10.64.3, it breaks my outside access into the webserver…
But discussing this with you, have just had a thought that it might be a NAT issue inside the wireless controller - gonna look at that now…
Yep, that was where I started > > Working on the Wireless controller at the moment, will let you know!!
All working - turned out it was the $%#%$* laptop that I was testing with!!! Nothing wrong with my Hairpin settings at all That’s the trouble with working remotely to set these things up - I’m 150km away from where the router and server is, using a remote laptop hardwired via teamviewer to test changes to the wireless network.