Suppose we have 2 computers, one of them has an Internet connection. We can
connect them over firewire and get a local network:
Code:
sudo modprobe eth1394
sudo ifconfig eth2 192.168.200.1 up
sudo modprobe eth1394
sudo ifconfig eth8 192.168.200.2 up
Suppose that we connect to the Internet via LAN from 192.168.200.1. How to share this Internet connection over firewire onto 192.168.200.2?
On 192.168.200.1 do the following:
Code:
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/conf/all/forwarding
If the latter command gives the following error:
Code:
bash: /proc/sys/net/ipv4/conf/all/forwarding: Permission denied
uncomment the "net.ipv4.conf.default.forwarding = 1" line in the "/etc/sysctl.conf":
Code:
sudo gedit /etc/sysctl.conf
and remove the # in front of the "net.ipv4.conf.default.forwarding = 1"
Then apply the changes:
If the forwarding is enabled you will get 1
Code:
cat /proc/sys/net/ipv4/ip_forward
1
otherwise you will get 0
Code:
cat /proc/sys/net/ipv4/ip_forward
0
Now on the on the 192.168.200.2 do the following:
Code:
sudo route add default gw 192.168.200.1
That's it. You should have Internet connection on 192.168.200.2 now!
p.s. Windows XP allowed to share Internet connection over firewire, but you can't do that in Windows Vista and Windows 7.
But you still can use Windows XP, Linux or Mac OS...