On 8/10/12 12:48 PM, [email protected] wrote:
> Hi folks!
> 
> I need to block ultrasurf and searching over the web found a lot of info 
> about this but nothing works as espected.
> 
> I found a partial solution: block IPs using a virtual machine with virtualbox 
> with this program and cutting the connection.
> This program search another IP to get conected again and work again.
> 
> I will create a script and execute this every minute to create a dinamic list 
> of this.
> 
> In /etc/params i create a new parameter called PROXYS with IPs separated by 
> comma and work ok, but i need to recreate this line every time i found a new 
> IPs of this program.
> 
> I can use sed to do this and change the line every time, but i didn't have 
> skill to do this. I now i have to learn about sed!
> 
> Can i use in /etc/params somethig like:
> 
> IPPROXY=/home/shorewall/ip_list.proxy ???
> 

filetolist() {
   local list=$(cat $1)
   echo $list | sed 's/ /,/g
}

IPPROXY=$(filetolist /home/shorewall/ip_list.proxy)

-Tom
-- 
Tom Eastep        \ When I die, I want to go like my Grandfather who
Shoreline,         \ died peacefully in his sleep. Not screaming like
Washington, USA     \ all of the passengers in his car
http://shorewall.net \________________________________________________

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Shorewall-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to