Hi guys!
I have a question regarding port forwarding.
I have a fedora server, with two eth cards: eth0 ---> external IP, eth1 ----> LAN IP
I use SNAT for connection sharing. I also have an internet domain hosted on this server... let's call it
www.mydomain.com
Anyway, one of our computers in the LAN has some kind of web server on it, which must be accessed from the internet on the port 23700.
So, using iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 23700 -j DNAT --to 192.168.1.25 (the IP of the network computer)
Everything works perfectly fine from outside the lan.
When I type
www.mydomain.com:23700, I connect to that computer.
My problem is that inside the lan, typing
www.mydomain.com:23700 does not work! It only works if I enter it by IP 192.168.1.25:23700
Is there any way to make the server forward my request to that specific computer even if I'm inside the LAN?