B_o_B wrote:
> Sunday, March 2, 2003   @   1:52:30 AM Central Standard Time
> 
> Hello, and a good day to you all.  I have a question for you all.
> I am operating a Smoothwall box as my firewall/router at my house.
> I would like to open/forward incoming transmissions on ports
> 28800-29100 to a box behind the firewall.  Smoothwall has a nice little web interface to config its
> services, but the port forwarding part of the interface only allows for one
> value at a time.  I would need to add each port # & IP # one by one (using
> the web interface).  I read through all the Smoothwall docs, and their
> was no mention of howto forward multiple ports (without having to add
> each value one by one).  I fired a similar message to this one to this group, but
> did not see any response.  I piped into the Smoothwall group, and
> fired the same question.  I received two responses.  The first
> response advised that the option I seek is available in the Smoothwall
> commercial version.  Smoothwall would be more than happy to hook me up with
> that version as soon as I whip out my credit card.  No Good...  The
> 2nd response advised that I could write my own code in Perl to allow
> for such functions.  Unfortunately, I do not know Perl at the moment.
> Stuck again.  I tooled around the system & found the file that
> contains the port forwarding values.
> 
> My New Question now is, can I make a script that will add all these
> values for me?
> 
> The syntax of the file looks like:
> tcp,0.0.0.0/0,1214,192.168.1.100,1214,on
> 
> the 0.0.0.0/0,1214 is any incoming tcp on port 1214
> the 192.168.1.100,1214 is my box behind the wall
> #(if I have offending anyone by these past few lines, I will make sure
> # I am slacked for the offense to your superior intellect.)
> 
> Is there a way I can make a script that would add each line to the
> config file for all the ports from 28800-29100
> tcp,0.0.0.0/0,28800,192.168.1.100,28800
> add line by line through to
> tcp,0.0.0.0/0,29100,192.168.1.100,29100
> 
> Any suggestions on what command or commands I could check out to
> accomplish this would be greatly appreciated.

perl -e 'for($i = 28800; $i < 29101; $i++) { print 
"tcp,0.0.0.0/0,$i,192.168.100,$i\n";} >> name_of_file_to_append_to

Eric



_______________________________________________
Twin Cities Linux Users Group Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list