My OpenVPN config is working fine and I can access the internet from the pi itself but I have no internet access when I connect to the tethered wifi using my phone. Can anyone spot something I am doing wrong:
Code: Select all
sudo sysctl -p
net.ipv4.ip_forward = 1
Code: Select all
service openvpn status
● openvpn.service - OpenVPN service
Loaded: loaded (/lib/systemd/system/openvpn.service; enabled)
Active: active (exited) since Sun 2017-12-17 06:06:27 GMT; 25min ago
Process: 1325 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 1325 (code=exited, status=0/SUCCESS)
Dec 17 06:06:27 osmc systemd[1]: Started OpenVPN service.
Code: Select all
ping www.google.com
PING www.google.com (209.85.203.147): 56 data bytes
64 bytes from 209.85.203.147: seq=0 ttl=49 time=30.423 ms
Code: Select all
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
iptables -A FORWARD -i tun0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i eth0 -o tun0 -j ACCEPT
Code: Select all
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Code: Select all
connmanctl tether wifi on mySSID AnAwesomePassword