Skip to contentSkip to conversation

iptables: exe

DISCUSSION Antony Stone 1 participant 1 message Sep 21, 2002 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 5 lines · Tasha Smith

Thanks Antony for your tips..:) im just starting out with iptables so it is really helping..and yes i have 2 interfaces so i will move the forwarding rule to the end, and add these rules:
iptables --policy OUTPUT DROP

I would recommend you don't add that policy until everything else is working, because you are likely to block stuff getting out of your machine with this policy and it's better to have a system which works, then you add this rule and fix what gets broken, instead of putting this in at the beginning and getting too many problems to fix all at once.

Quoted 1 line

iptables --policy FORWARD DROP

Good. Then you add the rules to your FORWARD chain to allow the packets you
want.

Quoted 1 line

iptables -t nat --policy PREROUTING DROP

No !!!!!! Don't do that !!!! Setting a DROP policy, or even creating a
DROP rule, in a nat table is a really *bad* idea. You will block *all
sorts* of traffic from getting through your machine and it simply won't work.

Do not filter packets in the nat tables - use those for address translating. Do your filtering in the filter tables - mainly in the INPUT and FORWARD chains, depending on where the packets are going.

Quoted 1 line

iptables -t nat --policy OUTPUT DROP

Remove this rule for the same reason given above.

Quoted 1 line

iptables -t nat --policy FORWARD DROP

There is no nat table in the FORWARD chain, so you couldn't even do this one if you tried :-)

Quoted 2 lines

HEHEHE...now only if i could get them to startup :) properly!!

Like I said earlier, I hope someone else here can help with that - there are
plenty of RedHat users on the list. Unfortunately (for you) I'm not one of
them.

Antony.

Signature · 1 line
This email was created using 100% recycled electrons.