LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   routing and NATing (https://www.linuxquestions.org/questions/linux-networking-3/routing-and-nating-524086/)

mwagz 01-30-2007 10:36 AM

routing and NATing
 
I have a linux box in my lan with internal ip 10.22.0.44, gw 10.22.0.1, internal DNS 172.29.200.11, external DNS 209.244.0.3. This was accessed from the internet through public ip 196.201.212.148 by NATing.

I need to change the public ip 41.222.13.204 and default gw to 10.22.0.251.

I added a static route in /etc/network/interfaces :
auto eth2
iface eth2 inet static
address 10.22.0.44
netmask 255.255.0.0

network 10.22.0.0
gateway 10.22.0.251

up route add -net 172.0.0.0 network 255.0.0.0 gw 10.22.0.1
down route del -net 172.0.0.0 netmask 255.0.0.0 gw 10.22.0.1


dns-nameserver 209.244.0.3




Problem:
I still cant connect through the public ip 41.222.13.204.
Box:
Debian Linux 3.1

acid_kewpie 01-31-2007 03:39 AM

why should that box be reachable now? what routing changes and firewall permissions have you put in place around the box to make this possible?

stick with NAT, it's the right way to do it.


All times are GMT -5. The time now is 05:34 PM.