3 ms·
A little gotcha: "iptables -L" doesn't list the NAT table rules; do "iptables -L; iptables -t nat -L" instead.
by fduran 14y ago
A little gotcha: "iptables -L" doesn't list the NAT table rules; do "iptables -L; iptables -t nat -L" instead.
- js2 14y agoI also almost always add '-n' to iptables commands to disable reverse name resolution, which can sometimes take a while. Similarly when calling netstat.
- Florin_Andrei 14y agoI use -n with almost any network-related command. Probably overreacting, but I hate to just sit there staring at a black rectangle.
- lflux 14y agoI always use 'iptables -L -n -v --line-numbers' - verbose will show you stuff like which interface the rule is set to, and line numbers can be useful when adding a rule before another with 'iptables -I'
- thyrsus 14y agoMe too. Even more important is that a host on multiple networks may have the same PTR value for each address, and thus one can lose information in the reverse lookup. "host w.x.y.z" ( or Solaris "nslookup -type=ptr z.y.x.w.in-addr.arpa" ) is available if you don't recognize the IP address.
- X-Istence 14y agodig -x <ip> Will also correctly do a PTR query for the reverse entry for that IP. Also functions correctly with IPv6, so you don't need to remember to split the IPv6 address up into a lot of dots :P