0

I have a PPP connection over USB (dev ppp0), and an eth0 connection. My Linux box has IP 192.168.1.1, I have a second Windows PC with an IP of 192.168.1.3. The ppp conection is 192.168.1.2 - which is a correctly configured embedded system. I would like traffic to be able to flow between the ppp0 connection, and 192.168.1.3. When I try and ping 192.168.1.2 from 192.168.1.3 I find that the destination is unreachable - I actually get that specific message. I can ping 192.168.2 from 192.168.1.1. I can also ping 192.168.1.3 from 192.168.1.1 and visa verse. I have turned on IP Forwarding. I have also executed the following commands.

route add -net 192.168.1.2 netmask 255.255.255.255 gw 192.168.1.1
route add -net 192.168.1.2 netmask 255.255.255.255 dev ppp0

I would like network traffic destined for 192.168.1.2 to be routed to/from whatever other host is on the same 192.168.1.* network. How do I do this.

  • Please post the output of ifconfig, route -n, and iptables -nvL. – Gilles Oct 2 '13 at 22:47
0
iptables -t nat -A PREROUTING -p tcp -d 192.168.1.2/255.255.255.0  -j DNAT --to 192.168.1.1/255.255.255.0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.