LinuxQuestions.org
Review your favorite Linux distribution.
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 08-28-2003, 05:57 AM   #1
mcalizo
Member
 
Registered: Aug 2003
Location: Manila, Philippines
Distribution: RH
Posts: 43

Rep: Reputation: 15
pls comment on my firewall


Hi,

I setup my iptables to look like this one below, I drop all incoming packet from the internet using port telnet, ftp,smtp and leave the port http,https, and ssh open. but on my lan i live all ports open and specify certain ip and netmask.

With this set of rules why i cant access HTTPS?

Is this set of rules on iptables safe now?


Chain INPUT (policy ACCEPT 240K packets, 68M bytes)
pkts bytes target prot opt in out source destination
1 60 ACCEPT tcp -- any any anywhere anywhere tcp dpt:https
2 100 ACCEPT tcp -- any any anywhere anywhere tcp dpt:http
0 0 ACCEPT tcp -- eth1 any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT tcp -- eth1 any anywhere anywhere tcp dpt:telnet
0 0 ACCEPT tcp -- eth1 any anywhere anywhere tcp dpt:ftp
1 40 DROP tcp -- eth0 any anywhere anywhere tcp dpt:telnet
11 1674 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:ssh
0 0 DROP tcp -- eth0 any anywhere anywhere tcp dpt:smtp
3 144 DROP tcp -- eth0 any anywhere anywhere tcp dpt:ftp

Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:http
0 0 ACCEPT tcp -- eth0 any anywhere anywhere tcp dpt:https
0 0 ACCEPT tcp -- eth1 any 130.1.0.0/16 anywhere tcp dpt:ssh
0 0 ACCEPT tcp -- eth1 any 130.1.0.0/16 anywhere tcp dpt:telnet
0 0 DROP tcp -- eth0 any anywhere anywhere tcp dpt:telnet
0 0 DROP tcp -- eth0 any anywhere anywhere tcp dpt:ssh
0 0 DROP tcp -- eth0 any anywhere anywhere tcp dpt:ftp
0 0 DROP tcp -- eth0 any anywhere anywhere tcp dpt:smtp

Chain OUTPUT (policy ACCEPT 20618 packets, 1312K bytes)
pkts bytes target prot opt in out source destination
[root@localhost root]# Chain INPUT (policy ACCEPT 240K packets, 68M bytes)

Pls. comment with my setup

Thanks...
Mike
 
Old 08-29-2003, 09:49 AM   #2
mychl
Member
 
Registered: Jul 2001
Location: Earth
Posts: 164

Rep: Reputation: 30
Looks to me like you are still using ipchains....

Look here

|
\/
 
Old 08-29-2003, 11:49 AM   #3
seabass55
Member
 
Registered: Jan 2003
Location: 127.0.0.1
Distribution: Fedora&Gentoo
Posts: 207

Rep: Reputation: 30
Lets see the actual script.....all that stuff is jibber jabber to me
 
Old 08-29-2003, 01:03 PM   #4
joe_stevensen
LQ Newbie
 
Registered: Jun 2001
Location: San Jose, CA
Distribution: Debian (Servers); Gentoo (Desktop)
Posts: 29

Rep: Reputation: 15
A better idea might be to set your default INPUT policy to DROP.
This will drop all INPUT by default, and only allow in what you want.
 
Old 09-03-2003, 04:46 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
A better idea might be to set your default INPUT policy to DROP.
This will drop all INPUT by default, and only allow in what you want.


Excellent comment. Btw, there's nothing wrong with using ipchains if you don't need iptables functionality...
 
Old 09-05-2003, 04:14 AM   #6
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
Search the forum if you want a iptables script which I think of as secure and which works fine by now ...
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shorewall Firewall Help Pls kumarsundaram Linux - Security 1 07-16-2005 01:32 AM
Big problem changed root password for mysql can't login pls comment johnnydangerous Linux - Software 5 07-08-2005 01:22 AM
Simple firewall script. pls help Wags Slackware 5 02-18-2004 04:13 PM
pls pls pls help me ! i'm tired with httpd config on fedora apache 2.0.48 AngelOfTheDamn Fedora 0 01-24-2004 05:12 PM
Xine Player Installation Files. Pls comment if wrong yenonn Linux - General 0 05-11-2003 08:19 PM

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

All times are GMT -5. The time now is 01:15 PM.

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