openconnect -> dns adguard
This commit is contained in:
+1
-1
@@ -487,7 +487,7 @@ default-domain = example.ru
|
||||
# Note that, you could use addresses from a subnet of your LAN network if you
|
||||
# enable [proxy arp in the LAN interface](http://ocserv.openconnect-vpn.net/recipes-ocserv-pseudo-bridge.html);
|
||||
# in that case it is recommended to set ping-leases to true.
|
||||
ipv4-network = 192.168.1.0
|
||||
ipv4-network = 10.0.2.0
|
||||
ipv4-netmask = 255.255.255.0
|
||||
|
||||
# An alternative way of specifying the network:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
route add -net 10.0.1.0 netmask 255.255.255.0 gw wg
|
||||
route add -net 10.0.2.0 netmask 255.255.255.0 gw oc
|
||||
cat /ssh/key.pub > /root/.ssh/authorized_keys
|
||||
ssh-keygen -A
|
||||
exec /usr/sbin/sshd -D -e "$@" &
|
||||
|
||||
+3
-1
@@ -1,9 +1,11 @@
|
||||
INTERFACE=$(route | grep '^default' | grep -o '[^ ]*$')
|
||||
cat /ssh/key.pub > /root/.ssh/authorized_keys
|
||||
ssh-keygen -A
|
||||
exec /usr/sbin/sshd -D -e "$@" &
|
||||
mkdir -p /dev/net
|
||||
mknod /dev/net/tun c 10 200
|
||||
chmod 600 /dev/net/tun
|
||||
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
|
||||
iptables -t nat -A POSTROUTING --destination 10.10.0.5 -j ACCEPT
|
||||
iptables -t nat -A POSTROUTING -o $INTERFACE -j MASQUERADE
|
||||
ocserv -c /etc/ocserv/ocserv.conf
|
||||
tail -f /dev/null
|
||||
|
||||
Reference in New Issue
Block a user