ovpn: Remove reference to udp/1194
* Remove references to udp/1194. * Works better with non-standard ports and tcp.
This commit is contained in:
		@@ -21,7 +21,7 @@ fi
 | 
				
			|||||||
[ -z "$proto" ] && proto=1194
 | 
					[ -z "$proto" ] && proto=1194
 | 
				
			||||||
[ -z "$port" ] && port=udp
 | 
					[ -z "$port" ] && port=udp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
conf=$OPENVPN/udp1194.conf
 | 
					conf=$OPENVPN/openvpn.conf
 | 
				
			||||||
if [ -f "$conf" ]; then
 | 
					if [ -f "$conf" ]; then
 | 
				
			||||||
    bak=$conf.$(date +%s).bak
 | 
					    bak=$conf.$(date +%s).bak
 | 
				
			||||||
    echo "Backing up $conf -> $bak"
 | 
					    echo "Backing up $conf -> $bak"
 | 
				
			||||||
@@ -49,6 +49,6 @@ route 192.168.254.0 255.255.255.0
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
proto $proto
 | 
					proto $proto
 | 
				
			||||||
port $port
 | 
					port $port
 | 
				
			||||||
dev tun1194
 | 
					dev tun0
 | 
				
			||||||
status /tmp/openvpn-status-1194.log
 | 
					status /tmp/openvpn-status.log
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,4 +20,9 @@ iptables -t nat -A POSTROUTING -s 192.168.254.0/24 -o eth0 -j MASQUERADE
 | 
				
			|||||||
# Dynamic subnet
 | 
					# Dynamic subnet
 | 
				
			||||||
iptables -t nat -A POSTROUTING -s 192.168.255.0/24 -o eth0 -j MASQUERADE
 | 
					iptables -t nat -A POSTROUTING -s 192.168.255.0/24 -o eth0 -j MASQUERADE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
openvpn --config "$OPENVPN/udp1194.conf"
 | 
					conf="$OPENVPN/openvpn.conf"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# TODO Remove after we stop caring about backwards compatibility
 | 
				
			||||||
 | 
					[ ! -s "$conf" ] && conf="$OPENVPN/udp1194.conf"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					openvpn --config "$conf"
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,4 +6,4 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
set -ex
 | 
					set -ex
 | 
				
			||||||
 | 
					
 | 
				
			||||||
tail -F /tmp/openvpn-status-1194.log
 | 
					tail -F /tmp/openvpn-status.log
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user