Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to share internet connection between two host using ethernet device and using pointopoint method but havent yet get any proper response,
Here is the chronology:

setting ip :

host a

ifconfig eth0 pointopoint netmask

host b

ifconfig eth0 pointopoint netmask

setting router(host A):

from host a, which host a had set ip_forward to '1' (sysctl and /proc/net/ipv4/)

iptables -A PREROUTING -t nat -j MASQUERADE

and on host b I've done on cli

route add default dev eth0

with /etc/resolv.conf contain


when pinging google the response like this :

PING ( 56(84) bytes of data.
From icmp_seq=2 Destination Host Unreachable
From icmp_seq=3 Destination Host Unreachable

oh my? where is my exactly fault ?

thanks in advance guys :)

share|improve this question
When you ping Google which host are you pinging from? On host A, what interface is your internet connection on? – bahamat Jan 30 '11 at 19:14
the internet connection interface is ppp0.. and 'route add default gw' havent yet make this issue solves... any idea ? – capede Jan 30 '11 at 19:54
ah im pinging from host B( – capede Jan 30 '11 at 20:14
Can you ping google from host A? Can host A and host B ping each other? Also, make sure you do not configure your interfaces in pointopoint mode. – bahamat Jan 31 '11 at 4:27

First, don't use pointopoint.

Secondly, your route on Host B should be:

route add default gw

You want to set your iptables rule to the following:

iptables -A PREROUTING -t nat -i eth0 -o ppp0 -j MASQUERADE

If you can provide more information I'll expand this answer to help you better.

share|improve this answer

You must log in to answer this question.

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