LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-30-2007, 10:36 AM   #1
mwagz
LQ Newbie
 
Registered: Jan 2007
Posts: 15

Rep: Reputation: 0
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
 
Old 01-31-2007, 03:39 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nating problem bondoq Linux - Networking 8 05-27-2006 07:02 AM
Problem with NATing gpagedar Linux - Networking 5 01-28-2006 08:04 PM
iptables twice nating beno123 Linux - Networking 0 07-27-2005 02:41 AM
IPTables Undesired NATing Wraezor Linux - Security 3 07-15-2005 05:09 AM
Nating ... suvajit Linux - Networking 3 05-15-2003 07:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration