How to configure a firewall that only allows a few webpages and dropbox and U1 services?
Can anyone give a step-by-step how-to that explains how to
- block all outgoing internet traffic to all websites, but allows only a selected list (needed for working, fi. online dictionaries)
- allows Dropbox and Ubuntu One to do their job (so backups will not be lost and things get synced)
- that can be switched off easily after a period of hard work
I have no knowledge whatsoever of networking, about hosts, IPs, subnets, subnetmasks, ports, ipconfig or whatever. In the past I always used firestarter to block all my outgoing traffic apart from a few webpages. Firestarter does not do the trick anymore. If I add an outgoing whitelist the policies just don't apply. With gufw I can't work because it is overtly complicated.
The use case: I need to stay focused on my work and thus I need easy access to the internet to be less easy. Thanks in advance on behalf of all networking noobs.
Edit/Update on why gufw is hard to use
What is hard to understand on gufw is how to define policies. In the Add Rules dialogue I do not understand
- in the simple tab, whether I should choose TCP or UDP or both. Whether I should choose a port or a service, what the dangers are of this and how to find the name of this port or service
- in the advanced tab, whether I should choose TCP or UDP or both and what the values of the from and to fields should be (especially the port number). Also why should I specify a from field? That's localhost right?
Solution 1:
This is not the first time somebody wanted to block the distraction of the internet while allowing some websites. Projects like SelfControl and FocalFilter have existed for a while. There has been a port to Linux of SelfControl and we have a few questions that travel down the same path:
- http://svn.jklmnop.net/projects/SelfControl.html
- SelfControl-like filtering
- "Get Shit Done": How to block websites temporarily?
- Timed-allowed websites with Squid/Dansguardian: Allowing a particular user to access a blocked site for a limited time