Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: doublecaps on August 06, 2009, 01:11:37 AM
-
I recently added an AllowHost entry on one of the services running on SME server.
Now I need to remove that entry to it will allow all traffic on that port/service again.
Is there a way to "delete" part of the config with a template?
I found this on the WIKI page (http://wiki.contribs.org/Firewall)
To remove a specific entry but leave other existing entries unchanged
config setprop squid BypassProxyFrom $(config getprop squid BypassProxyFrom | sed -e 's/entry-to-be-removed//' -e 's/^,//' -e 's/,$//' -e 's/,,//')
where entry-to-be-removed is the IP to be removed
I dont' fully understand it so I'm reluctant to use it.
Thanks in advance
-
doublecaps
See related answer here
http://forums.contribs.org/index.php/topic,43999.msg214547.html#msg214547
To remove a specific entry but leave other existing entries unchanged
config setprop squid BypassProxyFrom $(config getprop squid BypassProxyFrom | sed -e 's/entry-to-be-removed//' -e 's/^,//' -e 's/,$//' -e 's/,,//')
where entry-to-be-removed is the IP to be removed
I dont' fully understand it so I'm reluctant to use it.
Replace
entry-to-be-removed
with the IP you wish to remove
then issue the whole comand, replacing of course the key name and property ie
squid BypassProxyFrom
with
smtpd AllowHosts
-
To remove a specific entry but leave other existing entries unchanged
config setprop squid BypassProxyFrom $(config getprop squid BypassProxyFrom | sed -e 's/entry-to-be-removed//' -e 's/^,//' -e 's/,$//' -e 's/,,//')
where entry-to-be-removed is the IP to be removed
I dont' fully understand it so I'm reluctant to use it.
Next time, please try and use the code tag as that makes code fragments much more readbale don't you think?
config setprop squid BypassProxyFrom $(config getprop squid BypassProxyFrom | sed -e 's/entry-to-be-removed//' -e 's/^,//' -e 's/,$//' -e 's/,,//')