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 10.0.1.1 pointopoint 10.0.1.2 netmask 255.255.255.255
host b
ifconfig eth0 10.0.1.2 pointopoint 10.0.1.1 netmask 255.255.255.255
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
nameserver 8.8.8.8
when pinging google the response like this :
PING google.com (209.85.231.104) 56(84) bytes of data.
From 10.0.1.2 icmp_seq=2 Destination Host Unreachable
From 10.0.1.2 icmp_seq=3 Destination Host Unreachable
oh my? where is my exactly fault ?
thanks in advance guys :)