Where to find a easy "iptables for dummies" tutorial?
I know NOTHING about it and basically I need to allow only http, ssh and ftp connections...
thank you all
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 are a beginner you shouldn't use
iptables directly, as it probably will give you more problems than it solves. Unless you are familiar with a handful of RFC:s, you should use a frontend instead.
I would really recommend you to use
ufw if you don't route traffic between different LAN. It's quite easy to use and there are some useful instructions to look up. But if you do need routing, I have found
shorewall useful as
ufw doesn't support any routing or NAT (yet, it's comming).
The good thing with
ufw is that it also supports IPv6 besides IPv4, it uses both
In short, use a frontend and not
iptables unless you really know what you do and you know the differences between different
This article in the Community Wiki gives a basic rundown of
iptables. You can also pull up the
man page for it in Terminal with
man iptables. Generally, you do not need to use
iptables for a standard networking configuration, as each service will open the respective ports required for itself. If you have installed Apache, OpenSSH Server and an FTP server like ProFTP, their ports (80, 22 and 21 respectively) will be open.
At the bottom of the article I linked there are instructions for using graphical tools such as GUFW or Firestarter, which may be useful if you don't have a lot of experience working in the command line.
Generally MANuals are the best tutorials for the packages under Linux. However I remember for IPTABLES I also used YouTube videos. I think videos give a better understanding than texts for learning a new concept. Just search IPTABLES in the YouTube and you will see lots of videos. As an example this one which I followed myself.