Skip to contentSkip to conversation

IPtables

DISCUSSION Alexandre Carlos 1 participant 1 message Oct 17, 2002 netfilter

lore
Share & tools
lore
#0 lore raw

I have the following network

            B
          /  |  \
A1--A  |    C--C1
          \  |    /
             D

I wanto A1 to ping C1 through the following path a-b-c, so i created the following rule in the nat table of iptable

iptable -t nat -A PREROUTING -s 10.1.1.0/24 -d 192.168.67.0/24 -p icmp -j DNAT --to-destination 192.168.3.1

The network 10.1.1.0 representes A1, the network 192.168.67.0 C1 and the address 192.168.3.1 is the interface that the packet shoulkd reach B.

But when i start the ping i can´t capture the packet using the sniffer and when a turn down all the interfaces of B and D the ping don´t stop.

Can anyone help me please.

Regards,

Alex