I have an adhoc network set up between an Arch computer connected to the internet and a Ubuntu laptop. I want to share the internet connection between the two. I found a guide online and issued these commands on the computer connected to the internet.
On the other computer, the one that doesn't have internet I did
sudo iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
After doing that I cannot get connected to the internet still. What am I doing wrong here? Thank you for the help.
sudo route add default gw 192.168.0.1
sudo sh -c "echo 'nameserver 126.96.36.199' >> /etc/resolv.conf"
please, could you report on ubuntu pct?:
iptables -t nat -nvL
iptables - nvL
(if you have previous iptables rules)
I think that the problem can be due to ifconfig on ubuntu and route.