LinuxQuestions.org
Review your favorite Linux distribution.
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 06-04-2006, 11:44 AM   #1
doronunu
Member
 
Registered: Dec 2005
Location: Israel
Distribution: used : Ubuntu, Debian, Arch. current : Centos.
Posts: 69

Rep: Reputation: 15
iptables port 80 rule Q


hi,
i want everything that comming in, iptables will DROP
and ACCEPT only things that i told him by rules.
the problem is that my port 80's rules doesnt works and i dont know why.
i cant my site.

those r the rules i made for port 80 :

Code:
iptables -A INPUT -p tcp --dport www -j ACCEPT
iptables -A INPUT -p udp --dport www -j ACCEPT
iptables -A INPUT -p --syn --dport www -j ACCEPT
my OUTPUT policy is ACCEPT by the way.

Last edited by doronunu; 06-04-2006 at 11:49 AM.
 
Old 06-04-2006, 01:48 PM   #2
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
What is the rest of your iptables script like. What you have should work.
How are you checking?
Have you gone to and external location and tried it?
Some providers block common ports to stop users from running servers.
Goto http://www.hackerwatch.org/probe/ to see if the port is open.
Is this connected directly to the internet? or a router in between?

Brian1
 
Old 06-04-2006, 02:09 PM   #3
doronunu
Member
 
Registered: Dec 2005
Location: Israel
Distribution: used : Ubuntu, Debian, Arch. current : Centos.
Posts: 69

Original Poster
Rep: Reputation: 15
the port is open its on home and i can reach him if the iptables is flush and the policy set to accept.
i have only one more rule for ssh
 
Old 06-04-2006, 07:55 PM   #4
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
What if all you do is flush, set policy to deny and then add the one rule. If it starts working, that means there's something else catching your packets before it can get to the last one.
 
  


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
What is it doing this iptables rule?? lanczer Linux - Security 1 02-24-2006 12:26 PM
Question about a iptables rule? rjw1678 Linux - Security 2 11-18-2005 08:46 AM
help with iptables rule!! vishamr2000 Linux - Security 6 11-09-2005 06:34 AM
IPTables Rule... Grim Reaper Linux - Software 8 04-28-2003 01:20 PM
IPTABLES rule file (need help) chris200t Linux - Networking 5 11-11-2002 03:33 PM


All times are GMT -5. The time now is 11:53 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration