I am running OPENVPN on my Rpi
It is all working nicely except after I run the VPN, or it connects I lose access to SSH from outside the LAN, meaning I cannot SSH into it from the WAN side.
I have check my router and everything is set up correctly, it is just when the OPENVPN is running and connect to the VPN I get this issue.
this is my ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:cb:b8:f4:69
inet addr:192.168.1.200 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:feb8:e468/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5422 errors:0 dropped:0 overruns:0 frame:0
TX packets:859 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:383485 (374.4 KiB) TX bytes:115101 (112.4 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:240 (240.0 B) TX bytes:240 (240.0 B)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.0.9.69 P-t-P:10.0.9.69 Mask:255.255.254.0
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:188 errors:0 dropped:0 overruns:0 frame:0
TX packets:191 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:14366 (14.0 KiB) TX bytes:14479 (14.1 KiB)
pi@raspbmc:~$
**** the tun0 interface is created from my OpenVPN connection,
it is a service I get from my internet provider.
My client.conf looks like this
# Automatically generated OpenVPN client config file
# Generated on Fri Apr 18 17:17:39 2014 by avpn1.acanac.net
# Note: this config file contains inline private keys
# and therefore should be kept confidential!
# Note: this configuration is user-locked to the username below
# OVPN_ACCESS_SERVER_USERNAME={private}
# Define the profile name of this particular configuration file
# OVPN_ACCESS_SERVER_PROFILE={private}
# OVPN_ACCESS_SERVER_ALT_PROFILE={private}/Dynamic
# OVPN_ACCESS_SERVER_CLI_PREF_ALLOW_WEB_IMPORT=True
# OVPN_ACCESS_SERVER_CLI_PREF_ENABLE_CONNECT=True
# OVPN_ACCESS_SERVER_CLI_PREF_ENABLE_XD_PROXY=True
# OVPN_ACCESS_SERVER_WSHOST={private}:443
# OVPN_ACCESS_SERVER_WEB_CA_BUNDLE_START
# -----BEGIN CERTIFICATE-----
...
# -----END CERTIFICATE-----
# OVPN_ACCESS_SERVER_WEB_CA_BUNDLE_STOP
# OVPN_ACCESS_SERVER_IS_OPENVPN_WEB_CA=1
# OVPN_ACCESS_SERVER_ORGANIZATION=OpenVPN Technologies, Inc.
setenv FORWARD_COMPATIBLE 1
client
server-poll-timeout 4
nobind
remote 67.45.10.206 443 udp
remote 67.45.10.206 443 udp
remote 67.45.10.206 443 tcp
remote 67.45.10.206 443 udp
remote 67.45.10.206 443 udp
remote 67.45.10.206 443 udp
remote 67.45.10.206 443 udp
remote 67.45.10.206 443 udp
dev tun
dev-type tun
ns-cert-type server
reneg-sec 604800
sndbuf 100000
rcvbuf 100000
auth-user-pass /home/pi/passwordVPN.txt
# NOTE: LZO commands are pushed by the Access Server at connect time.
# NOTE: The below line doesn't disable LZO.
comp-lzo no
verb 3
setenv PUSH_PEER_INFO
<ca>
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
</key>
key-direction 1
<tls-auth>
#
# 2048 bit OpenVPN static key (Server Agent)
#
-----BEGIN OpenVPN Static key V1-----
...
-----END OpenVPN Static key V1-----
</tls-auth>
## -----BEGIN RSA SIGNATURE-----
...
## -----END RSA SIGNATURE-----
## -----BEGIN CERTIFICATE-----
...
## -----END CERTIFICATE-----
## -----BEGIN CERTIFICATE-----
...
## -----END CERTIFICATE-----
# -----BEGIN RSA SIGNATURE-----
...
# -----END RSA SIGNATURE-----
pi@raspbmc:/etc/openvpn$
WHAT ROUTE's do I need to add to enable me access into my Raspberry Pi from the internet to enable me access.
MY ipTABLES -L is
iroot@raspbmc:/etc/openvpn# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT all -- 192.168.1.0/24 anywhere
ACCEPT udp -- anywhere anywhere udp dpt:openvpn
DROP all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
root@raspbmc:/etc/openvpn#
THANKS TO ANYONE who can help me.