Setting Up LAN Connection Between Two Linux PC

It usually worked before when I connect two Linux machines through a LAN cable and set Shared Internet Connection on the device whose internet I’d like to share. But it stopped working at some point (maybe my Linux installation is broken). I had to assign the IP and routes manually. Here are the settings for slave (master didn’t require any settings):

# Assign IP address to the client
sudo ifconfig eth0 10.42.0.2 netmask 255.255.255.0
sudo ip route add default via 10.42.0.1

After this, internet started working and I could ping to 8.8.8.8. However, DNS has some problems. I’ll be editing this page if I can manage to make DNS work too.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *