maikcat wrotewith firewall down and ip forwarding enabled i believe the problem is routing related...
That's what I was thinking from the beginning, but very confused as to why it was working, and then just stopped. I didn't change or add anything special for routing, initially it "just worked". Also, I was under the impression, that with this being a multihome configuration, I wouldn't have to add anything special for the routing, as the tun 10.8.0.1 and eth1 192.168.10.1 interfaces should be able to route to each other without additional configuration.
I am not seeing the 192.168.10.x routes getting pushed to the client. Keep in mind, the client is an Android phone. The netstat command didn't produce the desirable output, so I used the "ip route show" command within ConnectBot.
ip route show #from phone
default via X.X.X.101 dev rmnet1
10.8.0.4/30 dev tun0 proto kernel scope link src 10.8.0.6
X.X.X.96/29 dev rmnet1 proto kernel scope link src X.X.X.100
X.X.X.101 dev rmnet1 scope link
...X.X.X.101 being the phone's ISP IP.
Obviously, with those routes, it is defaulting to the phone's WiFi or Mobile connection, so tracerouting to 192.168.10.1 is not going to the VPN connection, and getting lost on the Internet. Seems to me, like the 'push "route 192.168.10.0 255.255.255.0"' is not working. Although, in the log file I do see it configured:
'PUSH_REPLY,redirect-gateway def1 bypass-dhcp,route 192.168.10.0 255.255.255.0,dhcp-option DNS 10.8.0.1,route 10.8.0.1,topology net30,ping 10,ping-restart 60,ifconfig 10.8.0.6 10.8.0.5' (status=1)
And on the phone's log file, I see no error with the related configuration:
[route][192.168.10.0][255.255.255.0]
Below are all the update configs.
server.conf
port 1194
proto udp
dev tun
multihome
tls-server
ca keys/ca.crt
cert keys/lup64.crt
key keys/lup64.key
dh keys/dh1024.pem
server 10.8.0.0 255.255.255.0
keepalive 10 60
inactive 600
comp-lzo
user openvpn
group openvpn
persist-tun
persist-key
verb 3
log-append /var/log/openvpn.log
push "redirect-gateway def1 bypass-dhcp"
push "route 192.168.10.0 255.255.255.0"
push "dhcp-option DNS 10.8.0.1"
client.conf
client
proto udp
remote X.X.X.X
port 1194
dev tun
nobind
comp-lzo
verb 3
ip route show #for server
default via X.X.0.1 dev eth0
10.8.0.0/24 via 10.8.0.2 dev tun0
10.8.0.2 dev tun0 proto kernel scope link src 10.8.0.1
X.X.0.0/19 dev eth0 proto kernel scope link src X.X.X.X
169.254.0.0/16 dev eth0 scope link metric 1002
169.254.0.0/16 dev eth1 scope link metric 1003
192.168.10.0/24 dev eth1 proto kernel scope link src 192.168.10.1
firewall has forwarding enabled:
echo "1" > /proc/sys/net/ipv4/ip_forward
echo "1" > /proc/sys/net/ipv4/ip_dynaddr
iptables -n -v -L
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
29 2455 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
716 38160 ACCEPT all -- eth1 * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- tun0 * 0.0.0.0/0 0.0.0.0/0
37 13983 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
0 0 ACCEPT udp -- eth0 * 0.0.0.0/0 X.X.X.X udp dpt:1194
2 770 DROP all -- eth0 * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 227 packets, 81683 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 1098 packets, 1506K bytes)
pkts bytes target prot opt in out source destination
iptables -L -t nat -v
Chain PREROUTING (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 3 packets, 202 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 3 packets, 202 bytes)
pkts bytes target prot opt in out source destination