LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 01-04-2017, 07:52 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 10
Post iptables for Dummies.


Hello.
I like to learn iptable and write my rules but I guess it is hard to learn. I found some documents but...I need a cheat sheet that explain it for me from basic. For example, Tell me what does "A","p","m" mean, "dport" and "state", "j","i","FORWARD","OUTPUT" and...

Any idea?

Thank you.
 
Old 01-04-2017, 11:00 AM   #2
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,315
Blog Entries: 15

Rep: Reputation: 3107Reputation: 3107Reputation: 3107Reputation: 3107Reputation: 3107Reputation: 3107Reputation: 3107Reputation: 3107Reputation: 3107Reputation: 3107Reputation: 3107
Have you googled for this? I quickly found this guide which explains most of the arguments you list. It tells you what "states" are too.
 
Old 01-04-2017, 11:32 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 5,511
Blog Entries: 3

Rep: Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773
Try to gradually acclimate to the manual pages in cases like this. It's a good reference document where you can look up things like that quickly.

Code:
man iptables
man iptables-extensions
man man
You can search a manual page with / and ? for forward and backward searches respectively. Don't worry about trying to read the whole manual page, it's a reference not a novel.
 
Old 01-04-2017, 01:23 PM   #4
JockVSJock
Senior Member
 
Registered: Jan 2004
Location: DC
Distribution: RHEL/CentOS
Posts: 1,386
Blog Entries: 4

Rep: Reputation: 164Reputation: 164
Probably the best guide, past down to me by unSpawn.

http://linuxtopia.org/Linux_Firewall...les/index.html
 
Old 01-04-2017, 01:41 PM   #5
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 5,511
Blog Entries: 3

Rep: Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773Reputation: 2773
Quote:
Originally Posted by JockVSJock View Post
Probably the best guide, past down to me by unSpawn.

http://linuxtopia.org/Linux_Firewall...les/index.html
That one is 2005, there is a 2006 version here : https://www.frozentux.net/documents/iptables-tutorial/

It has a good amount of background material. But it's a bit out of date in regards to the options and the manual pages are more authoritative in regards to the options themselves.
 
Old 01-06-2017, 11:24 AM   #6
jmccue
Member
 
Registered: Nov 2008
Location: US
Distribution: slackware
Posts: 393

Rep: Reputation: 197Reputation: 197
I would say unless you have a real reason to learn iptables, I would probably learn Nftables (wikioedia) instead. I heard that is suppose to replace iptables someday. BTW I am far from an expert on either, but this is what I have been hearing
 
Old 01-08-2017, 07:53 AM   #7
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by hazel View Post
Have you googled for this? I quickly found this guide which explains most of the arguments you list. It tells you what "states" are too.
In your idea it is most???
 
Old 01-08-2017, 07:55 AM   #8
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by jmccue View Post
I would say unless you have a real reason to learn iptables, I would probably learn Nftables (wikioedia) instead. I heard that is suppose to replace iptables someday. BTW I am far from an expert on either, but this is what I have been hearing
You right but manual!!!
 
Old 01-08-2017, 09:04 AM   #9
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by jmccue View Post
I would say unless you have a real reason to learn iptables, I would probably learn Nftables (wikioedia) instead. I heard that is suppose to replace iptables someday.
Emphasis on the 'someday'. I've been hearing that since around 2009 or so, and there really isn't a definitive timetable for it to happen, as far as I know. There was a brief flurry of activity around when it looked like Xtables might make the great leap forward, but recently not so much.

Unless you really have some more info about when Nftables might become mainstream, I wouldn't put off learning iptables for it.

As far as references are concerned the 'frozentux' one is good (but somewhere between a manual and a tutorial...and not a short piece of work that you'll finish reading over coffee), and the iptables man pages are among the better man pages, being more readable than most.

If you'd prefer reading through someone's worked example, I'm also fond of this in spite of it being relatively old now.
 
1 members found this post helpful.
Old 01-09-2017, 10:05 AM   #10
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
I'll second the link that Turbocapitalist posted. This is what I used to learn IPTABLES back in the day. today you will need to look at the man pages also to get an up to date view of the new commands.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] VSFTPD for Dummies Carnix Linux - Newbie 14 08-18-2011 08:22 PM
SUSE Linux 9.3 for Dummies (For Dummies S.) samuelmp SUSE / openSUSE 11 08-01-2005 01:42 PM
IPTables for Dummies required Bill Fox Linux - Networking 1 02-14-2005 01:26 PM
Slackware for Dummies Ryuji Yamazaki Linux - Newbie 5 10-28-2004 02:52 PM
C++ For Dummies AFI_Flame Programming 6 10-15-2004 02:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration