Networking Forums

Networking Forums > Computer Networking > Linux Networking > icmp unreplied when masquerading

Reply
Thread Tools Display Modes

icmp unreplied when masquerading

 
 
Nils
Guest
Posts: n/a

 
      04-13-2004, 09:24 PM
I'm trying to do some masquerading using iptables (1.2.9) on kernel 2.4.18:

modprobe ip_tables
modprobe ip_conntrack
modprobe ip_conntrack_ftp
modprobe iptable_nat
modprobe ip_nat_ftp
echo "1" > /proc/sys/net/ipv4/ip_forward
EXT="my-eth0-addr"
INT="my-eth1-addr"
iptables -F FORWARD
iptables -P FORWARD -j ACCEPT
iptables -F OUTPUT
iptables -P OUTPUT -j ACCEPT
iptables -F INPUT
iptables -P INPUT -j ACCEPT
iptables -t nat -F
iptables -v -t nat -A POSTROUTING -o $EXT -j MASQUERADE

which returns:
MASQUERADE all opt -- in * out 192.168.1.128 0.0.0.0/0 -> 0.0.0.0/0

(I've additionally enabled ipv4 forwarding in sysctl.conf)

This computer (d2) is masquerading on the eth0-interface in the below
setup. Through the eth1-if united may be pinged and through the eth0-if
ff may be pinged.

united d2 ff
eth0---------eth1
eth0--------eth0

But when pinging from united to ff using d2 as gateway:
united:~ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
ff d2 255.255.255.255 UGH 0 0 0 eth0

I get the following from /proc/net/ip_conntrack (I've replace IP's for
names) and thus no replies:

icmp 1 29 src=united dst=ff type=8 code=0 id=18953 [UNREPLIED]
src=ff dst=united type=0 code=0 id=18953 use=1

.... and the following from tcpdump on d2:

[root@d2 /root]# tcpdump icmp
User level filter, protocol ALL, TURBO mode (575 frames), datagram
packet socket
tcpdump: listening on all devices
17:42:35.593597 eth1 < united > ff: icmp: echo request (DF)
17:42:35.593630 eth0 > united > ff: icmp: echo request (DF)

Running tcpdump icmp yields 0 packets
(zero/zip/none/keine/nothing/not-a-single)

How come I not get a icmp reply? ... how should I further debug this
problem?

Nils



 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN Masquerading problem bolero92@yahoo.com Linux Networking 0 12-29-2004 03:06 PM
IP Masquerading Tejas Kokje Linux Networking 1 04-14-2004 02:42 AM
Masquerading Ali Rafeek Linux Networking 1 01-03-2004 04:33 PM
Sendmail masquerading =?ISO-8859-1?Q?Lars-G=F6ran_Andersson?= Linux Networking 1 01-02-2004 05:49 PM
IP Masquerading and REDHAT 9 Michael Linux Networking 0 08-17-2003 03:33 AM



1 2 3 4 5 6 7 8 9 10 11