You are not logged in.

#1 2006-06-21 13:58:27

riwa
Member
From: Lund, Sweden
Registered: 2006-04-04
Posts: 215

How to know which ports are open?

I followed Wiki for a simple Iptables firewall. However, I don't know how to open up more ports nor to check which ones I have.

155611/home/riwa# iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere            state RELATED,ESTABLISHED
interfaces  all  --  anywhere             anywhere
open       all  --  anywhere             anywhere
REJECT     tcp  --  anywhere             anywhere            reject-with tcp-reset
REJECT     udp  --  anywhere             anywhere            reject-with icmp-port-unreachable

Chain FORWARD (policy DROP)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Chain interfaces (1 references)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere

Chain open (1 references)
target     prot opt source               destination
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh

I get totally lost in the manpages.


If you must have must. Have must.
- DKE supporters about this wonderful swedish soda.

Offline

#2 2006-06-21 16:13:25

Stinky
Member
From: The Colony, TX
Registered: 2004-05-28
Posts: 187

Re: How to know which ports are open?

www.grc.com
Is a good resource to check what you have open, etc....
This is the syntax to open another port for input:

$IPTABLES -A INPUT -p udp -i $EXTIF -s $UNIVERSE --dport 53 -j ACCEPT

for output:

$IPTABLES -A OUTPUT -p udp -o $EXTIF -d $UNIVERSE --sport 53 -j ACCEPT

Offline

Board footer

Powered by FluxBB