Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-26-2008, 07:21 PM   #1
LQ Newbie
Registered: Aug 2008
Posts: 4

Rep: Reputation: 0
NAT Troubleshooting

How could I troubleshoot my NAT setup. I have 2 computers.

comp1: (eth1) and dhcp for (eth0)
comp2: (eth0)

I have enabled ip_forwarding and my firewall is as follows.
iptables -P INPUT DROP

iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -A INPUT -s -d -i lo -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -i eth1 -j ACCEPT
iptables -A INPUT -p icmp -j ACCEPT

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCE
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
I stll can not connect from the second computer. I can access my apache webserver from the second computer, but not the internet.
What steps can I take to troubleshoot this if anyone knows.
Old 08-26-2008, 07:31 PM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 658Reputation: 658Reputation: 658Reputation: 658Reputation: 658Reputation: 658
This weblog page may help.

Make sure to pay attention to which kernel modules you need loaded. For example, you may need nf_conntrack loaded.
Make sure that ip_forward is enabled. Check that the gateway and resolv.conf values on the second computer are correct.

I noticed a few months back the some of the kernel modules have new names. On the most recent kernels the modules probably begin with nf_.


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
Difference between NAT and NO NAT plisken Linux - Networking 1 01-10-2008 12:53 PM
troubleshooting how-to? chilehead Linux - Hardware 2 02-06-2005 05:58 PM
I configure NAT and use "services ..." to save it but when I reboot there is no nat bruack Linux - Software 4 09-01-2004 03:38 AM
Susefirewall2 Nat Problem / nat 1:1 trubi Linux - Distributions 0 07-20-2004 06:50 AM
What's the difference between Linux-NAT and Sygate-NAT? yuzuohong Linux - Networking 0 08-07-2002 05:07 AM

All times are GMT -5. The time now is 11:36 PM.

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