Skip to contentSkip to conversation

Iptables rules.

DISCUSSION Shams Fantar 3 participants 3 messages Sep 22, 2007

lore
Share & tools
lore
#0 lore raw

Hello,

I am writing iptables rules. Here is the rules, they are in a script : http://jumble.snurf.info/iptables-start

When I use it, It blocks all access to the network. Why ?

Do you have suggestions for my rules ?

Regards,

Signature · 1 line
Shams Fantar (http://snurf.info)
#1 lore raw

Add:
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

Reason: You aren't allowing the incoming packets from the host you are connected to (you send a packet, server recieves the packet, server sends reply, your iptables rules drop it).

Shams Fantar <[email protected]> kirjoitti Sat, 22 Sep 2007 21:57:21 +0300:

Quoted 10 lines

Hello,

I am writing iptables rules. Here is the rules, they are in a script : http://jumble.snurf.info/iptables-start

When I use it, It blocks all access to the network. Why ?

Do you have suggestions for my rules ?

Regards,

#2 lore raw
In reply to Shams Fantar
Quoted 7 lines · Shams Fantar

Hello,

I am writing iptables rules. Here is the rules, they are in a script : http://jumble.snurf.info/iptables-start

When I use it, It blocks all access to the network. Why ?

Do you have suggestions for my rules ?

There has to be a way for replies to outbound traffic to get back in. Maybe this (probably near the top):

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

The rules -A OUTPUT aren't needed because OUTPUT's policy is already ACCEPT.

hth,
:m)