IPTables question

Mike Ballon mike.ballon at gmail.com
Fri Jul 1 12:22:17 MST 2011


When listing try iptables -L -n

also you should see a port, ex:

ACCEPT     tcp  --  10.0.0.0/8           0.0.0.0/0           state NEW tcp
dpt:22

or in your case I'm guessing ici is the protocol and you grep ici from
/etc/services you'll see port 2200

I would just use the IP on the rule unless you have a reason not to.


On Fri, Jul 1, 2011 at 2:54 PM, keith smith <klsmith2020 at yahoo.com> wrote:

> Hi,
>
> I added a rule : iptables -A INPUT -p tcp -s 24.221.202.36 --dport 22 -j
> ACCEPT
>
> and when I list the iptables I see:
>
> ACCEPT     tcp  --  24-221-202-36.pools.static.spcsdns.net
> anywhere            tcp dpt:ici
>
> Are the below two rules the same?
>
> iptables -A INPUT -p tcp -s 24.221.202.36 --dport 22 -j ACCEPT
> iptables -A INPUT -p tcp -s 24-221-202-36.pools.static.spcsdns.net --dport
> 22 -j ACCEPT
>
> in other words can I use 24-221-202-36.pools.static.spcsdns.net in place
> of the IP?
>
> Also I do not see the port when I issue iptables -L ?  How can I sell if
> the rule applies to a specific port?
>
> Thanks!
>
> ------------------------
> Keith Smith
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20110701/85e582fc/attachment.html>


More information about the PLUG-discuss mailing list