From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Maxime Ducharme" Subject: Re: Creating a variable for multiple IP addresses? Date: Fri, 13 Jan 2006 13:16:15 -0500 Message-ID: <03bb01c6186d$71558610$b000a8c0@cybergeneration.com> References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: netfilter-bounces@lists.netfilter.org Errors-To: netfilter-bounces@lists.netfilter.org Content-Type: text/plain; charset="us-ascii" To: Arthur DiSegna Cc: netfilter@lists.netfilter.org Hello You may use this method to add each IP to a rule : for ip in $NOC; do iptables -A SOME_CHAIN -p tcp -s $ip --dport 139 -m state --state NEW -j ACCEPT done The loop will read each IP and add them to rules one by one. HTH Maxime Ducharme ----- Original Message ----- From: "Arthur DiSegna" To: Sent: Friday, January 13, 2006 1:00 PM Subject: Creating a variable for multiple IP addresses? Hi, What is correct syntax to have one variable equal more than one ip address (not in order)? Is is possible or do I have to create a different rule for each IP. For example I want to enable Samba on a Linux server but only want a few members of network operations to have access to the server. NOC="192.168.0.1 192.168.0.2 192.168.0.25" Thanks in advance