icmp unreplied when masquerading

This is a discussion on icmp unreplied when masquerading within the Linux Networking forums, part of the Linux Forums category; I'm trying to do some masquerading using iptables (1.2.9) on kernel 2.4.18: modprobe ip_tables modprobe ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-13-2004
Nils
 
Posts: n/a
Default icmp unreplied when masquerading

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 Search this Thread
Search this Thread:

Advanced Search
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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 01:30 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0