Ubuntu: Internet through WiFi, LAN through ethernet


How can I have my Ubuntu system simultaneously access the internet through its own WiFi adapter (not sharing) and have the wired ethernet connection be used to access the LAN? Where LAN means it's connected to the HTPC via crosover cable. Both function properly on their own, but whenever I activate the ethernet connection, I loose internet access.


You have to manually set default route or through Network Manager or via CLI.

The 2 network should have different subnet, i.e. wlan0 lan0

With CLI you can try removing the default lan0 gateway like this

route del default gw dev eth0  

Then add the default gateway for wlan0

route add default gw dev wlan0  

Remember to check the dns in /etc/resolv.conf

All commands should be run by root.

Sorry if too short but wrote from cell phone

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »