LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 05-06-2009, 08:14 AM   #1
cryptwizard
Member
 
Registered: Aug 2004
Location: Sydney, Australia
Distribution: Debian Squeeze
Posts: 49

Rep: Reputation: 15
NAT just won't work!


So my internet interface is ppp0 and my internal interface is eth0.

Code:
root@azgalor:/# ip a s ppp0
12: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast state UNKNOWN qlen 3
    link/ppp
    inet 124.168.164.113 peer 203.55.231.88/32 scope global ppp0
root@azgalor:/# ip a s eth0
11: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether 00:1c:c0:7f:64:ea brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.2/8 brd 10.255.255.255 scope global eth0
    inet6 fe80::21c:c0ff:fe7f:64ea/64 scope link
       valid_lft forever preferred_lft forever
I ran
Code:
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
and tracing out to the internet from a host on the internal network, all it gets to is the first hop.

I've also tried some other variation on Google like:
Code:
iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to 124.168.164.113
with exactly the same result.

I have no other iptables rules configured.

Oh yes, and the router's routing table:
Code:
root@azgalor:/# ip r s
203.55.231.88 dev ppp0  proto kernel  scope link  src 124.168.164.113
10.0.0.0/8 dev eth0  proto kernel  scope link  src 10.0.0.2
default dev ppp0  scope link
Any help would be appreciated!
Thanks!
 
Old 05-06-2009, 09:02 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
Looks OK, but have you got ip_forward enabled? Check what's actually leaving your ppp0 with tcpdump - "tcpdump -vn -i ppp0"
 
Old 05-07-2009, 04:21 PM   #3
cryptwizard
Member
 
Registered: Aug 2004
Location: Sydney, Australia
Distribution: Debian Squeeze
Posts: 49

Original Poster
Rep: Reputation: 15
ip_forward is enabled.
I'll try to get a tcpdump later.
 
Old 06-04-2009, 03:07 AM   #4
cryptwizard
Member
 
Registered: Aug 2004
Location: Sydney, Australia
Distribution: Debian Squeeze
Posts: 49

Original Poster
Rep: Reputation: 15
I've tcpdumped and found that when I ping, I can see it going out ppp0, but there is no reply.
When I tcpdump on the external server that I am pinging, I can see that it is receiving the ping and sending a reply.
 
  


Reply



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
tcp_keepalive_time does it work for NAT? dlublink Linux - Networking 2 02-01-2008 09:46 AM
fc6---nat doesnt work :( pengusaha Linux - Networking 7 12-16-2007 02:22 AM
gIFT behind NAT doesn't seem to work Remarque Linux - Software 1 02-21-2005 03:23 PM
gIFT behind NAT doesn't seem to work Remarque Linux - Software 0 02-21-2005 03:02 PM
making ftp work through nat iceaway Mandriva 2 03-12-2004 05:43 PM

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

All times are GMT -5. The time now is 09:03 PM.

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