LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 04-16-2004, 12:07 PM   #1
Homzz
LQ Newbie
 
Registered: May 2003
Distribution: slackware 9.1
Posts: 23

Rep: Reputation: 15
Look ok ?


Hi this is my first time config. IPTABLES wondering if this looks ok

iptables -F
iptables -X
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP
iptables -P INPUT DROP

iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -A INPUT -i eth0 -p tcp --dport http -j ACCEPT
iptables -A INPUT -i eth0 -p icmp -j ACCEPT


Then just open ports i want open such as ssh ftp etc...Sound ok Please let me know.
 
Old 04-17-2004, 07:47 AM   #2
souljah
Member
 
Registered: Feb 2004
Location: New York City
Distribution: Debian
Posts: 97

Rep: Reputation: 15
Looks like you have the right idea. It is always nice to add comments to your scripts, so you remember what you were thinking at a later time. for example:

iptables -A INPUT -p tcp --dport 21 -j ACCEPT #ftp
iptables -A INPUT -p tcp --dport 22 -j ACCEPT #ssh
iptables -A INPUT -p tcp --dport 80 -j ACCEPT #http

Enjoy
 
Old 04-17-2004, 12:16 PM   #3
Homzz
LQ Newbie
 
Registered: May 2003
Distribution: slackware 9.1
Posts: 23

Original Poster
Rep: Reputation: 15
thx, will try it and see how and goes and adding comments does make sense =P will give it a go
 
Old 04-17-2004, 12:57 PM   #4
dominant
Member
 
Registered: Jan 2004
Posts: 409

Rep: Reputation: 30
I think youhave forgoten the lo (localhost or 127.0.0.1) interface.
Moreover, you could DROP all the ICMP packets. It is recommended.
 
  


Reply



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



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

All times are GMT -5. The time now is 09:43 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