Trying to share Internet between Ubuntu and Arch, failing to keep settings

view full story

http://www.linuxquestions.org – Hi, all. As you may have guessed by the title, I'm trying to share an internet connection between my current Ubuntu machine and another machine running Arch (used to be Puppy, got tired of fighting with it, so I decided to go KISS). I've got the machines connected by way of a crossover cable, and the Ubuntu machine has a wireless connection to the router, which goes to the modem (and thus the Internet :)). The problem I'm having is in trying to adapt the Arch Wiki's instructions for sharing an internet connection betwen two computers, to suit my configuration (the tutorial assumes both machines are running Arch, when mine are not). I've used the following commands: On the Ubuntu machine (linuxbox): Code: root@linuxbox:~# ifconfig eth0 netmask root@linuxbox:~# ifconfig eth0 up root@linuxbox:~# echo 1 > /proc/sys/net/ipv4/ip_forward root@linuxbox:~# iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE On the Arch machine (archie): Code: [root@archie ~]# ifconfig eth0 netmask [root@archie ~]# ifconfig eth0 up [root@archie ~]# route add default gw eth0 [root@archie ~]# echo "nameserver" >> resolv.conf [root@archie ~]# echo "nameserver" >> resolv.conf The last two of archie's commands have the same DNS server addresses as linuxbox's resolv.conf. This seems to get things working, as I can: Code: [root@archie ~]# ping PING ( 56(84) bytes of data. 64 bytes from icmp_seq=1 ttl-64 time=1.38 ms 64 bytes from icmp_seq=2 ttl-64 time=0.122 ms 64 bytes from icmp_seq=3 ttl-64 time=0.119 ms ^C --- ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2001ms rtt min/avg/max/mdev = 0.119/0.542/1.387/0.597 ms [root@archie ~]# ping www.yahoo.com PING www-real.wa1.b.yahoo.com ( 56(84) bytes of data. 64 bytes from icmp_seq=1 ttl-52 time=23.9 ms 64 bytes from icmp_seq=1 ttl-52 time=22.2 ms ^C --- www-real.wa1.b.yahoo.com ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 10001ms rtt min/avg/max/mdev = 22.212/23.844/23.957/0.885 ms [root@archie ~]# However, when I reboot archie, I'm back to square one. I find it easier to re-install Arch just so I can get a nice clean slate to re-configure. I don't see anything in the tutorial that shows how to make this permanent for the 2nd computer (in my case archie). (HowTos)