Linux Netfilter discussions
 help / color / mirror / Atom feed
* list of ip
@ 2006-03-13 13:02 Pedro Drimel Neto
  2006-03-13 13:30 ` Cedric Blancher
  0 siblings, 1 reply; 2+ messages in thread
From: Pedro Drimel Neto @ 2006-03-13 13:02 UTC (permalink / raw)
  To: netfilter

How do I make a rule with a lot os ips like

IPS="{192.168.1.2, 192.168.1.50, 192.168.1.55}"

iptables -A INPUT -p tcp -s $IPS -j DROP

Regards.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: list of ip
  2006-03-13 13:02 list of ip Pedro Drimel Neto
@ 2006-03-13 13:30 ` Cedric Blancher
  0 siblings, 0 replies; 2+ messages in thread
From: Cedric Blancher @ 2006-03-13 13:30 UTC (permalink / raw)
  To: Pedro Drimel Neto; +Cc: netfilter

Le lundi 13 mars 2006 à 10:02 -0300, Pedro Drimel Neto a écrit :
> How do I make a rule with a lot os ips like
> IPS="{192.168.1.2, 192.168.1.50, 192.168.1.55}"
> iptables -A INPUT -p tcp -s $IPS -j DROP

An iptables rule can only take one src and/org dst at the time, saying
one host or network. Thus, shell scripting is your friend:

	IPS="192.168.1.2 192.168.1.50 192.168.1.55"
	for i in $IPS; do
		iptables -A INPUT -p tcp -s $i -j DROP;
	done


-- 
http://sid.rstack.org/
PGP KeyID: 157E98EE FingerPrint: FA62226DA9E72FA8AECAA240008B480E157E98EE
>> Hi! I'm your friendly neighbourhood signature virus.
>> Copy me to your signature file and help me spread!


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-03-13 13:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-13 13:02 list of ip Pedro Drimel Neto
2006-03-13 13:30 ` Cedric Blancher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox