Browse Source

ocserv: avoid setting up the firewall from ocserv.init

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Nikos Mavrogiannopoulos 10 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
4 4
 
5 5
 START=50
6 6
 
7
-setup_firewall() {
8
-	local port fw
9
-	config_get port	$1 port
10
-	test -z "$port" && return
11
-
12
-	config_get fwport $1 fwport
13
-	test "$fwport" = "$port" && return
14
-
15
-	logger -t ocserv "opening port $port..."
16
-	#can we remove the old rule?
17
-	uci add firewall rule
18
-	uci set firewall.@rule[-1].src=wan
19
-	uci set firewall.@rule[-1].name="ocserv-ext-port"
20
-	uci set firewall.@rule[-1].target=ACCEPT
21
-	uci set firewall.@rule[-1].proto=tcpudp
22
-	uci set firewall.@rule[-1].dest_port=$port
23
-	uci commit firewall
24
-
25
-	uci set ocserv.config.fwport="$port"
26
-	uci commit ocserv
27
-
28
-	/etc/init.d/firewall restart
29
-}
30
-
31 7
 setup_config() {
32 8
 	config_get port         $1 port "4443"
33 9
 	config_get max_clients  $1 max_clients "8"
@@ -170,8 +146,6 @@ start() {
170 146
 	chmod 600 /var/etc/ocpasswd
171 147
 	config_foreach setup_users ocservusers
172 148
 
173
-	setup_firewall config
174
-
175 149
 	service_start /usr/sbin/ocserv -c /var/etc/ocserv.conf
176 150
 }
177 151