Browse Source

ocserv: avoid setting up the firewall from ocserv.init

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
lilik-openwrt-22.03
Nikos Mavrogiannopoulos 11 years ago
parent
commit
085e028855
1 changed files with 0 additions and 26 deletions
  1. +0
    -26
      net/ocserv/files/ocserv.init

+ 0
- 26
net/ocserv/files/ocserv.init View File

@ -4,30 +4,6 @@ SERVICE_USE_PID=1
START=50
setup_firewall() {
local port fw
config_get port $1 port
test -z "$port" && return
config_get fwport $1 fwport
test "$fwport" = "$port" && return
logger -t ocserv "opening port $port..."
#can we remove the old rule?
uci add firewall rule
uci set firewall.@rule[-1].src=wan
uci set firewall.@rule[-1].name="ocserv-ext-port"
uci set firewall.@rule[-1].target=ACCEPT
uci set firewall.@rule[-1].proto=tcpudp
uci set firewall.@rule[-1].dest_port=$port
uci commit firewall
uci set ocserv.config.fwport="$port"
uci commit ocserv
/etc/init.d/firewall restart
}
setup_config() {
config_get port $1 port "4443"
config_get max_clients $1 max_clients "8"
@ -170,8 +146,6 @@ start() {
chmod 600 /var/etc/ocpasswd
config_foreach setup_users ocservusers
setup_firewall config
service_start /usr/sbin/ocserv -c /var/etc/ocserv.conf
}


Loading…
Cancel
Save