Hi all,
I recently set up OpenVPN on Fedora 16. I can connect to it on my Windows 7 computer and on my Android phone as clients.
My goal is to tunnel all traffic through my phone to the VPN.
The
issue I am having is, although both my computer and my phone can connect to the VPN properly, neither can ping the server.
I'm on my laptop currently, on 10.8.0.6, and it can't ping the server at 10.8.0.1. On my internal LAN where the server resides, the gateway's local IP address is 10.10.10.254.
Here are my configs:
Server
dev tun
local 10.10.10.162 port 1194
tls-server
ca /etc/openvpn/ca.crt
cert /etc/openvpn/server.crt
key /etc/openvpn/server.key
dh /etc/openvpn/dh1024.pem
mode server
ifconfig 10.8.0.1 10.8.0.2
ifconfig-pool 10.8.0.4 10.8.0.255
push "route 10.8.0.1 255.255.255.255"
push "dhcp-option DOMAIN example.com"
push "dhcp-option DNS 10.10.10.254"
push "dhcp-option WINS 10.10.10.254"
keepalive 10 60
inactive 600
route 10.8.0.0 255.255.255.0
group openvpn
persist-tun
persist-key
ifconfig-pool-persist ippool.txt
push "redirect-gateway"
tls-auth /etc/openvpn/ta.key 0
cipher BF-CBC
comp-lzo
client-to-client
log /etc/openvpn/openvpn.log
verb 5
Client
client
dev tun
proto udp
remote 75.82.165.198 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert phone.crt
key phone.key
ns-cert-type server
tls-auth ta.key 1
cipher BF-CBC
comp-lzo
verb 5
route-delay
I'm not sure whether my iptables is configured correctly for this, here is the code from the Fedora OpenVPN page which I used (I didn't have both eth0 and eth1, and am using wlan0 for this, so I changed all to be wlan0):
iptables -A INPUT -i wlan0 -p udp --dport 1194 -j ACCEPT
iptables -A INPUT -i tun+ -j ACCEPT
iptables -A FORWARD -i tun+ -j ACCEPT
iptables -A FORWARD -i wlan0 -o tun+ -j ACCEPT
iptables -A FORWARD -i wlan0 -o tun+ -m state --state ESTABLISHED,RELATED -j ACCEPT
Can somebody help me to get this working so I can both ping my VPN server, and redirect my traffic through the VPN?