1

I have the following configuration:

network-configuration

Routing table on M3 is:

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.2.1     0.0.0.0         UG        0 0          0 eth1
192.168.2.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1
192.168.3.0     0.0.0.0         255.255.255.192 U         0 0          0 eth0

Routing table on M1 is:

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         192.168.0.1     0.0.0.0         UG        0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
192.168.2.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1

So basically M3's gateway is M1, and M1's gateway is M2's wireless internet interface. If I ping 8.8.8.8 from M1, everything is ok, replies are received. Pinging from M1 to M3 and viceversa is also possible.

I have configured M1 as gateway trafic forwarder using firestarter package and stopped firewall with it.

iptables policies are ACCEPT for everything.

Problem: I have tried ping-ing ip 8.8.8.8 from M3 but without success.

What could be the source of this problem?

7
  • Could you pls post M1's routing table, and state whether you can ping M1 from M3? Oct 27, 2013 at 21:00
  • @MariusMatutiae edited and added required information. Oct 27, 2013 at 21:08
  • 1
    Is that a typo where M1 and M2 have the same IP on the 192.168.2.x network? And which device has 192.168.0.1 - does it have a route for 192.168.2.x?
    – Paul
    Oct 27, 2013 at 22:16
  • You should use tcpdump or wireshark on M1 to see where M3 pings disappear. Oct 27, 2013 at 22:28
  • @Paul, no, it's actually a bridged connection between the virtual machine and my laptop and I've configured both interfaces with that IP. 192.168.2.101 should have a route through switch->m3(192.168.2.1)->m1->m3(192.168.0.101)->wireless(192.168.0.1) Oct 28, 2013 at 20:19

1 Answer 1

0

From M1 you can ping outside, and from M3 you can ping M1. Thus the only mis-configuration may occur inside M1, as a go-between.

I am not familiar with the firestarter package, but in Debian I would have configured M1 as follows (commands to be issued as sudo):

 echo 1 > /proc/sys/net/ipv4/ip_forward
 iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
 iptables --append FORWARD  --in-interface eth1 -j ACCEPT

The first command generically allows forwarding. The other two instructions activate nat (the first one) and allow forwarding from M3. I suspect this may be the root of your problem because you stated that iptables has been disabled.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .