Firewall setup

Asked by Rinaldus

Please say, if iptables needs to be customized after Ubuntu typical installation (from LiveCD) or is it installs automatically and can protect me from hacking right after installation and by default settings?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Vojtěch Trefný (vojtech.trefny) said :
#1

It's better to configure it. Most used are these two programs - Firestarter (graphical interface) and Firehol (command line based program).

https://help.ubuntu.com/community/Firestarter

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#2

Please try a very easy and quick solution...

I have a 2 minutes ready made firewall script http://www.elart.it/kubuntu/firewall

To easy install it open a terminal and type:

sudo apt-get update; sudo apt-get install -y --assume-yes wget

give your user password, you don't see nothing when type it, then press enter

Then type:

cd /etc/init.d/; sudo wget http://www.elart.it/kubuntu/firewall; sudo chmod 755 firewall
sudo apt-get install sysv-rc-conf;
sudo update-rc.d firewall start 01 0 1 2 3 4 5 6 .

Please edit and verify or change in the top of firewall file the row
IFEXT="eth0" # Change with your network active interface name: eth0, eth1, ppp0, etc

to view your active device name type:
ifconfig -h

so change it, type:
sudo gedit /etc/init.d/firewall

To automatic start firewall put X by pressing space on firewall row
sudo sysv-rc-conf

To stop firewall
sudo /etc/init.d/firewall stop
to view rules
sudo /etc/init.d/firewall status
to restart firewall
sudo /etc/init.d/firewall start

To view filtered packed with log

sudo tail -f /var/log/syslog

To make on line test to verify your protection:
https://www.grc.com/x/ne.dll?bh0bkyd2

Hope this helps

Revision history for this message
Wrwrwr (wrwrwr) said :
#3

@Marcobra, don't you think you should give some options as to what should be blocked and what to let through? Your script blocks nfs and smb, generally a good thing to do, but how many will know that they must perform an additional step to enable file sharing? On the other hand you allow some seldom used things on default e.g.: Frostwire, i didn't even know what's that before i've studied your script ;) Certainly such a script may be useful, but i wouldn't exactly call that a typical user configuration.

Can you help with this problem?

Provide an answer of your own, or ask Rinaldus for more information if necessary.

To post a message you must log in.