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 sometimes USB tether my laptop to my phone to allow me to access the internet using 3G. The problem is that all sorts of things, such as the Update Manager, will go online and use up my valuable allowance.

Is it possible to somehow configurate things such that:

  • when (and only when) I am connected to the internet using the tethered phone, no application is able to go online, except...
  • applications which are run under a certain user (eg sudo -u internetaccess lynx http://mysite/)
  • when I am connected using Wifi/ethernet access is normal

Is there a way I can do this?

(I am on Ubuntu 11.04 and my phone is an Android - when I plug in the USB cable, it all Just Works)

share|improve this question
add comment

2 Answers

you can use gufw to set up the firewall, allowing and disallowing communications as you wish. You can also turn this on and off as desired too. To install, look for gufw in USC or type in terminal:

sudo apt-get install gufw

share|improve this answer
    
I've installed gufw, but am having trouble configuring it. I have activated it, but even by adding ALLOW HTTP I am unable to browse using lynx... –  Rich Jul 5 '11 at 14:09
    
strange...try unblocking port 80 –  Conor Rynne Jul 7 '11 at 15:47
add comment

There's a good solution given by tobykurien at this question, which points to this post. His solution uses a slightly different approach, which I'll summarise it as these steps:

  • Step 1: create an internet access group
  • Step 2: setup firewall rules to only allow access to that group and disallow everything else
  • Step 3: open a terminal as the internet group

Any app launched from this terminal will have internet access.

share|improve this answer
add comment

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.