Re: Inserting new rule with wildcard

Jari Fredriksson <[email protected]> Mon, 18 Jul 2011 12:02:25 +0300
Newsgroups gmane.linux.debian.devel.firewall
Message-ID <[email protected]>
18.7.2011 11:31, tower kirjoitti:
> Hi
> 
> Is there any way of use asterisk as wilcard in iptables rule?
> 
> For example:
> 
> iptables -I OUT_APACHE -d *.fbcdn.com -j ACCEPT
> iptables v1.3.3: host/network `*.fbcdn.com' not found
> 
> or
> 
> iptables -I OUT_APACHE -d '*.fbcdn.com' -j ACCEPT
> iptables v1.3.3: host/network `*fbcdn.com' not found
> 
> or
> 
> iptables -I OUT_APACHE -d "*.fbcdn.com" -j ACCEPT
> iptables v1.3.3: host/network "*.fbcdn.com' not found
> 
> returns error.
> 
> Regards!
> 

iptables uses IP-addresses, but if you enter a DNS-name it tries to
resolve it to an IP-address. You have to figure out somehow the
netblock/mask for fbcdn.com and enter that.




-- 

Q:	How do you stop an elephant from charging?
A:	Take away his credit cards.
signature.asc (application/pgp-signature, 260 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4j9qEACgkQKL4IzOyjSrZoqgCfe0ZL6sCP4TVXcwu+dvdk7ctB
M3cAoN/8WudNagraAXpo6JmQ8yrjx1y0
=rqmH
-----END PGP SIGNATURE-----