I am new to this and am running this on openwrt on both sides using obfsproxy.
I am trying to route all traffic over tun0 if I enable redirect-gateway def1 it kills all internet access. If I disable it I can ping across the tunnel and access the internet from the local gateway, effectively splitting the tunnel. If I manually execute "route add default gw 10.69.0.5 tun0" it kills all outbound routing as well. I think I am missing something. Below are the configs.
Server config:
persist-key
persist-tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
dev tun2
dh /etc/openvpn/dh2048.pem
ifconfig-pool-persist /tmp/openvpn_4443-ipp.txt
key /etc/openvpn/server.key
log /tmp/openvpn_4443.log
port 4443
proto tcp
server 10.69.0.0 255.255.255.0
redirect-gateway def1
verb 7
Client config:
client
persist-key
persist-tun
ca /etc/openvpn/ca.crt
cert /etc/openvpn/client.crt
dev tun
key /etc/openvpn/client.key
log /tmp/openvpn.log
<connection>
socks-proxy-retry
socks-proxy 127.0.0.1 7777
remote xxx.xxx.xxx.xxx 2222
proto tcp
</connection>
remote-cert-tls server
verb 7
Client route with enable redirect-gateway def1:
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.69.0.5 128.0.0.0 UG 0 0 0 tun0
default 10.10.10.1 0.0.0.0 UG 0 0 0 wlan0
10.0.0.0 * 255.0.0.0 U 0 0 0 wlan1
10.10.10.0 * 255.255.255.0 U 0 0 0 wlan0
10.69.0.1 10.69.0.5 255.255.255.255 UGH 0 0 0 tun0
10.69.0.5 * 255.255.255.255 UH 0 0 0 tun0
127.0.0.1 10.10.10.1 255.255.255.255 UGH 0 0 0 wlan0
128.0.0.0 10.69.0.5 128.0.0.0 UG 0 0 0 tun0
192.168.100.0 * 255.255.255.0 U 0 0 0 br-lan
192.168.240.0 * 255.255.255.0 U 0 0 0 wlan1-1
Server Side:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
10.8.0.0 10.8.0.2 255.255.255.0 UG 0 0 0 tun0
10.8.0.2 * 255.255.255.255 UH 0 0 0 tun0
10.9.0.0 10.9.0.2 255.255.255.0 UG 0 0 0 tun1
10.9.0.2 * 255.255.255.255 UH 0 0 0 tun1
10.69.0.0 10.69.0.2 255.255.255.0 UG 0 0 0 tun2
10.69.0.2 * 255.255.255.255 UH 0 0 0 tun2
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
Server iptable:
iptables -L | grep 10.69.
ACCEPT all -- 10.69.0.0/24 anywhere