"Destination Net Unreachable" | trying to share internet to a desktop machine over direct ethernet connection
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
"Destination Net Unreachable" | trying to share internet to a desktop machine over direct ethernet connection
My laptop connects to the internet wirelessly through a mobile hotspot. I directly connected the laptop to my desktop PC over an ethernet cable. I'm trying to share my laptops internet connection with my desktop this way. I can ping each machine's IP from the other machine successfully, and can SSH both ways successfully. This issue is the desktop can't ping the internet; it says "Destination Net Unreachable". I've tried pinging google.com and voidlinux.org.
Both machines use NetworkManager on Void Linux. I set the laptop's IPv4 method to "Shared to other computers", and the desktop's method to "Link-Local". I also tried "Automatic" on the desktop and same result.
I have not played with Void but Network Manager uses dsnmasq as a DHCP server for its internet connection sharing.
Make sure whatever address you use for the ethernet adapter is not in the same subnet as the wifi connection.
All the settings for dnsmasq should be in /etc/NetworkManager/dnsmasq-shared.d/ but I do not know how it is configured in Void. I assume but verify that all the necessary firewall rules have been added for NAT masquerading and that ip_forwarding is enabled.
You need to set the laptop , with internet access, as a gateway.
enable ip forwarding (google is your friend) and set the laptop's ip address , as the gateway of the desktop computer.
i.e the laptop should be a gateway for your desktop.
That should do it IMO.
You need to set the laptop , with internet access, as a gateway.
enable ip forwarding (google is your friend) and set the laptop's ip address , as the gateway of the desktop computer.
i.e the laptop should be a gateway for your desktop.
That should do it IMO.
IP forwarding is enabled. The DNS, IPv4 address, netmask, and gateway (set to laptop's IPv4 address) have been set manually on the desktop. Still can't reach the internet with same error, still can ping the laptop just fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.