Ubuntu's Network Manager now comes with a cool feature to isolate an interface for local resources only. This feature allows you to specify an interface (like a VPN or a LAN connection) as local-only and not to be used for outbound internet connections.
From your WiFi menu, go to Edit Connections and then select the ethernet connection you would like to edit. Then, go to the IPv4 Settings tab, and click on the Routes button. Check the box labeled Use this connection only for resources on its network:
Do the same to the IPv6 Settings tab if necessary. Then, finally, disconnect and reconnect the altered interface.
Now, Ubuntu will intelligently not route internet-bound traffic through this interface.
Alternatively, you can do the same thing from the command-line.
cd over to
/etc/NetworkManager/system-connections and find the interface you want to target.
Open it with
sudo nano <your targeted interface> and add the following text below the
Your finished file should look something like:
Note that with the command-line method, you will need to disconnect and re-connect to the network to allow these settings to take place.