Is it necessary to configure a firewall like iptables or firestarter when the goal is only to surf safely?
For me, there is no need to open any port (i.e. samba, etc.).
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
If you're behind router and it uses network address translation (NAT) to share a single public IP assigned by your ISP, among computers in your LAN, I'd say you're pretty much safe and you don't need to set up addition firewall or iptables rules.
Because NAT, by default, will drop any unsolicated incoming traffic from the Internet when reaches your router. So in effect it also acts as a firewall that prevents incoming requests from reaching your computer
This also why when you need to access a service in your LAN from outside the network eg IP camera, you must set up a port forwarding on your router to allow the request to reach the service
Here are simple iptables rules that are helpful to deny things as pings and other unwanted input connections:
# Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0 -A INPUT -i lo -j ACCEPT -A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT # Accepts all established inbound connections -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT # Allows all outbound traffic # You could modify this to only allow certain traffic -A OUTPUT -j ACCEPT
You will find more details here.
If you're using Firefox (recommended), NoScript by Giorgio Maone is a great option worth considering!
The NoScript website itself looks a bit messy; don't let that give you the wrong impression, though!
NoScript also provides the most powerful anti-XSS and anti-Clickjacking protection ever available in a browser.
NoScript's unique whitelist based pre-emptive script blocking approach prevents exploitation of security vulnerabilities (known and even not known yet!) with no loss of functionality...
Watch the "Block scripts in Firefox" video by cnet.
Staying safe has never been so easy!
Experts do agree...
Additionally, you may want to refer to Should I use No-Script?