Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm tethering an android device over USB. When tether is accomplished, the device sets the usb0 interface as the default route.

I do not want this (usually, the host device has wlan0) but do not see a simple way to change in Ubuntu. dhcpcd does not have the --nohook option and --nogateway also doesn't seem to work in this case.

'route del' and 'route add' can obviously be used, but are quite..... a hardcoded solution, since they require the actual IPs etc.

Any ideas? TIA.

No solution so far-- could obviously be scripted.

share|improve this question

2 Answers 2

Open Networking > Wired Connections > Click on Android USB Tether > IPv4 > Routes > Tick "use only for resources on this network".

This will make it skip adding the default route to this connection, making whatever other connection the default one.

share|improve this answer

I guess a simple solution wwould be to not activate tethering on your Android when its not needed. I'm not sure if that is what you are asking, or if you want a more technical way of doing this via Ubuntu.

share|improve this answer
    
In which case, I wouldn't have IP connectivity to the device :P –  1kenthomas May 14 '12 at 22:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.