Skip to contentSkip to conversation

NAT Issue

DISCUSSION Kiran Murari 2 participants 2 messages Apr 19, 2007

lore
Share & tools
lore
#0 lore raw

Hi All,
I am facing an issue related to NAT.

My setup is as shown below.
PC--------Router---------ISP

I established a connection with the ISP (PPP link) and I am pinging google.com from LAN side host. Now if I disable WAN (leave the ping running) and then enable it, the session does not resume. Moreover, packet capture on the WAN interface shows LAN host address, but not the WAN IP.

The SNAT rules are in place.

# iptables -t nat -L POSTROUTING -n -v
Chain POSTROUTING (policy ACCEPT 13927 packets, 458K bytes)
pkts bytes target     prot opt in     out      source           destination
   0     0   SNAT     all  --  *      ppp0     0.0.0.0/0        
0.0.0.0/0      to:xx:xx:xx:xx
   0     0   SNAT     all  --  *      *        0.0.0.0/0        
0.0.0.0/0      MARK match 0x1111 to:zz:zz:zz:zz

ip_conntrack shows the following entry:

# cat /proc/net/ip_conntrack | grep icmp
icmp     1 29 src=yy:yy:yy:yy dst=64.233.167.99 type=8 code=0 id=16446 packets=575 bytes=48300 [UNREPLIED]
src=yy:yy:yy:yy dst=192.168.10.100 type=0 code=0 id=16446 packets=0 bytes=0 mark=0 use=1
yy:yy:yy:yy being the IP address of the LAN host.

But if I kill the ping session and start a new session, this gets NAT'ed properly.

Couldn't understand why the running session does not resume after the WAN is enabled.

Any help in this aspect is highly appreciated.

Best Regards,
Kiran

#1 lore raw

Hello,

Quoted 6 lines · Kiran Murari

My setup is as shown below.
PC--------Router---------ISP

I established a connection with the ISP (PPP link) and I am pinging google.com from LAN side host. Now if I disable WAN

What do you mean exactly ?

Quoted 1 line

(leave the ping running) and then enable it, the session does not resume.

What session ?

Quoted 6 lines

The SNAT rules are in place.

# iptables -t nat -L POSTROUTING -n -v
Chain POSTROUTING (policy ACCEPT 13927 packets, 458K bytes)
pkts bytes target     prot opt in     out      source           destination
   0     0   SNAT     all  --  *      ppp0     0.0.0.0/0        
0.0.0.0/0      to:xx:xx:xx:xx

Is the public address fixed or can it change at each PPP connection ?

Quoted 4 lines
# cat /proc/net/ip_conntrack | grep icmp
icmp     1 29 src=yy:yy:yy:yy dst=64.233.167.99 type=8 code=0 id=16446 packets=575 bytes=48300 [UNREPLIED]
src=yy:yy:yy:yy dst=192.168.10.100 type=0 code=0 id=16446 packets=0 bytes=0 mark=0 use=1
yy:yy:yy:yy being the IP address of the LAN host.

I doubt that the source address of the expected reply is the LAN host address. What is 192.168.10.100 ?