Say you have two network interfaces configured on your Ubuntu Desktop, and you want one of them to be used for Internet and the other only for its own internal resources.
We will do this using the graphical interface and this how-to works for both Unity and Gnome Shell.
Go to System Settings and then to Network Settings.
Then select the interface you want limited for internal use, which can be a wired internface or a wireless one:
Select routes, and in the next screen, toggle on "use this connection only for resources of its network"
Click OK and enter your password where prompted.