Iptables list

Lisa Kachold lisakachold at obnosis.com
Fri Nov 6 06:49:23 MST 2009


On Fri, Nov 6, 2009 at 5:30 AM, Craig White <craigwhite at azapple.com> wrote:

> On Fri, 2009-11-06 at 13:13 +0000, Marco Savo wrote:
> > Hello,
> > configuring iptables rules,
> > how I can find out if one port number I want to use is already in
> > use?
> > example:
> >
> > $IPTABLES -t nat -I zone_wan_prerouting 1 -j ACCEPT --protocol udp
> > --dport ${UDP_PORT}  --destination localhost
> > $IPTABLES -t nat -I zone_wan_prerouting 1 -j ACCEPT --protocol tcp
> > --dport ${TCP_PORT}  --destination localhost
> > $IPTABLES -t nat -I zone_wan_prerouting 1 -j ACCEPT --protocol tcp
> > --dport ${TCP_HOST_PORT}  --destination localhost
> >
> > How I can check if these ports (UDP_PORT TCP_PORT TCP_HOST_PORT) are
> > in use from another application?
> ----
> you can use netstat - for example, I might check for port 10000...
> # netstat -an|grep 10000
> tcp        0      0 0.0.0.0:10000     0.0.0.0:*     LISTEN
> udp        0      0 0.0.0.0:10000     0.0.0.0:*
>
> Craig
>
>
> You can also use nmap

# nmap localhost

or

# netstat -anpt

to see what is listening on what (depending on your distro - check syntax


-- 
Skype: (623)239-3392
AT&T: (503)754-4452
www.obnosis.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20091106/48baa367/attachment.htm 


More information about the PLUG-discuss mailing list