LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 06-27-2012, 02:22 PM   #1
gezley
Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware-64, Crux-64, NetBSD-64
Posts: 557

Rep: Reputation: 269Reputation: 269Reputation: 269
How do I assign a variable to hold multiple interfaces in Slackware firewall script?


I am using the firewall script generator provided by Eric. I have multiple virtual interfaces assigned to virtual machines. The script generates the following variable for a single internal interface:

LOCAL_IFACE="10.40.50.1"

How do I add other interfaces to this variable so that I don't have to add multiple rules each time I add another interface?

I tried space-separated values but it didn't work:

LOCAL_IFACE="10.40.51.1 10.40.52.1 10.40.53.1"
 
Old 06-27-2012, 06:20 PM   #2
silendo
Member
 
Registered: Jun 2012
Location: Italy
Distribution: Slackware 13.37
Posts: 45

Rep: Reputation: Disabled
Hello gezley, assign at LOCAL_IFACE var your interface (For example: eth0) don't assign ip address.
I think so work
 
Old 06-28-2012, 02:35 PM   #3
gezley
Member
 
Registered: Sep 2009
Location: Ireland
Distribution: Slackware-64, Crux-64, NetBSD-64
Posts: 557

Original Poster
Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally Posted by silendo View Post
Hello gezley, assign at LOCAL_IFACE var your interface (For example: eth0) don't assign ip address.
Thank you silendo.

The trouble is I have other variables which need to be filled in as well:

LOCAL_IFACE # the interface name, eg., eth0
LOCAL_IP # the IP address, eg., 10.40.40.1/32
LOCAL_NET # the network, eg., 10.40.40.0/24
LOCAL_BCAST # the broadcast address, eg., 10.40.40.255

All of these are used in the script generated by Alien Bob's firewall script generator.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Ubuntu-multiple interfaces- firewall hvipen Linux - Networking 4 11-06-2010 04:25 PM
firewall with multiple possible interfaces dasy2k1 Linux - Networking 3 03-12-2010 09:41 AM
bash script: how to assign an output (not the result) to a variable? Singing Banzo Programming 8 10-01-2006 07:29 PM
Shell script --cannot assign variable-- ralvez Programming 6 02-24-2006 05:56 PM
Firewall : Multiple external interfaces rlore Linux - Security 2 06-28-2005 10:18 PM


All times are GMT -5. The time now is 11:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration