There is nothing to screw up. If you changed your mind and you want eth1 to be your LAN internal interface, configure it with something like:
Code:
# Internal LAN interface
auto eth1
iface eth1 inet static
address 10.10.0.1
netmask 255.255.255.0
Then on the laptop go into Network and in the properties of your wired connection set:
IP 10.10.0.100
Subnet 255.255.255.0
Gateway 10.10.0.1
DNS 8.8.8.8 (Google DNS for example)
Then open command prompt on the laptop and try:
ping 10.10.0.1
That should return the ping from your server. If all of that works out, you're good to go.
At that moment the laptop will still not have full internet access.
On the server open /etc/sysctl.conf to edit with:
sudo nano /etc/sysctl.conf
Uncomment (remove the # from the start of) the line saying net.ipv4.ip_forward=1
Save the changes with Ctrl + O and exit nano with Ctrl + X.
Then on the server do:
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Now test if your laptop has internet access through the server. It should.
If that works, the only thing left is to make the iptables command permanent because executing it like that in command line will only set it up temporary. After a reboot it won't work.
But first do this test and making it permanent is easy.
Bookmarks