Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
specific iptables rule isnt working
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5941

PostPosted: Tue May 06, 2008 8:28 am    Post subject: specific iptables rule isnt working Reply with quote

I've created this rule:
/sbin/iptables -A INPUT -i eth0 -p tcp -m state --state NEW --sport 80 -s 192.168.113.94 -j ACCEPT

but the firewall still blocks it, I guess there is a typo somewhere but I cant seem to be able to find it
any hints?

thanks
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
di1bert
l33t
l33t


Joined: 16 May 2002
Posts: 963
Location: Oslo, Norway

PostPosted: Tue May 06, 2008 10:00 am    Post subject: Reply with quote

Can you paste the output from syslog where the packets are getting blocked ? That would help
towards finding the problem.

-m
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5941

PostPosted: Tue May 06, 2008 10:15 am    Post subject: Reply with quote

di1bert wrote:
Can you paste the output from syslog where the packets are getting blocked ? That would help
towards finding the problem.

-m


Rejected: IN=eth0 OUT= MAC=full mac address here SRC=192.168.113.94 DST=192.168.113.10 LEN=40 TOS=0x00 PREC=0x00 TTL=52 ID=0 DF PROTO=TCP SPT=80 DPT=39776 WINDOW=0 RES=0x00 RST URGP=0

the destination port changes once in a while
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
di1bert
l33t
l33t


Joined: 16 May 2002
Posts: 963
Location: Oslo, Norway

PostPosted: Tue May 06, 2008 3:14 pm    Post subject: Reply with quote

That's a bit of a strange one. Could there be another rule higher up that's catching it before it gets to this rule ?

-m
Back to top
View user's profile Send private message
zatalian
Apprentice
Apprentice


Joined: 27 Aug 2002
Posts: 179
Location: Gent, Belgium

PostPosted: Tue May 06, 2008 5:22 pm    Post subject: Reply with quote

Are you trying to allow access to your local webserver?
In that case, the packets that arrive have a destination port 80, not source port.
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23081

PostPosted: Wed May 07, 2008 3:08 am    Post subject: Reply with quote

The line from syslog shows that the dropped packet is a RST. RST packets are not NEW. They are typically ESTABLISHED, but they could be INVALID if they are spoofed or otherwise associated with a connection the kernel does not recognize.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5941

PostPosted: Wed May 07, 2008 5:16 am    Post subject: Reply with quote

huh? this is how to other computer works, I cannot change it,I have an accept rule for destination port 80
that is my third rule, the first one is accept localhost, second is accept related and established and then this rule
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum