Find the answer to your Linux question:
Results 1 to 2 of 2
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2008
    Posts
    27

    Internet Sharing


    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.
    Code:
    sudo iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
    sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"
    On the other computer, the one that doesn't have internet I did
    Code:
    sudo route add default gw 192.168.0.1
    sudo sh -c "echo 'nameserver 8.8.8.8' >> /etc/resolv.conf"
    After doing that I cannot get connected to the internet still. What am I doing wrong here? Thank you for the help.

  2. #2
    Linux Newbie JosePF's Avatar
    Join Date
    Jun 2010
    Posts
    225
    Hi,
    please, could you report on ubuntu pct?:
    iptables -t nat -nvL
    iptables - nvL
    (if you have previous iptables rules)
    and:
    route -n
    ifconfig
    I think that the problem can be due to ifconfig on ubuntu and route.

    Regards
    There are people trying to avoid mistakes and another that tries to target.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •