I have a mrt150n mini VPN router:
http://www.lyconsys.com/index.php/en/products/minivpnrouters
The mrt150n should establish a client openVPN connection to my openVPN-server on a Ubuntu 12.04.3 LTS machine. My client PCs should be able to use the mrt150n as a openVPN gateway. On the internet they should only be visible under the servers static IP address.
My network setup:
---------------- ---------- --------------- --------
|openVPN-Server|---|Internet|---|Fritz!Box7390|---|switch|
| static IP | | | |192.168.2.2 | | |
---------------- ---------- --------------- --------
|
----------------------------------------------------------------------------------------
| | | |
--------------- --------------- --------------- ----------------------------------
|ClientPC1 | |ClientPC2 | |ClientPC3 | |mrt150n router as openVPN client|
|192.168.2.100| |192.168.2.101| |192.168.2.102| |192.168.2.3 |
--------------- --------------- --------------- ----------------------------------
SERVER:
server.conf:
server 10.8.0.0 255.255.255.0
dev tun
port 1194
proto udp
ca ./easy-rsa2/keys/ca.crt
cert ./easy-rsa2/keys/server.crt
key ./easy-rsa2/keys/server.key
dh ./easy-rsa2/keys/dh2048.pem
cipher AES-256-CBC
push "redirect-gateway def1"
push "dhcp-option DNS 8.8.8.8" # DNS-Server 1 google open DNS
ping-timer-rem
keepalive 20 180
persist-key
persist-tun
user openvpn
group openvpn
verb 3
log /etc/openvpn/openvpn.log
mute 50
Routing activated:
sudo sysctl -w net/ipv4/ip_forward=1
nat masquerading:
/sbin/iptables -t nat -A POSTROUTING -o eth0 -s 10.8.0.0/24 -j MASQUERADE
CLIENT:
client.conf:
client
remote domain.tld 1194
proto udp
dev tun
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
cipher AES-256-CBC
verb 3
mute 50
The Fritz!Box router is the default gateway for all clients on the network. I created a static route:
10.8.0.0 192.168.2.3 255.255.255.0
I can establish a VPN connection from the mrt150n to my server. Logging in to the mrt150n I can ping 10.8.0.1 and google. A traceroute shows me everything is passing the tunnel.
But from a client PC I´m not able to ping 10.8.0.1. I think i missed something with the routing. But I can't figure out what it is.
Running the openVPN client on one of my ClientPCs (a Mac) with the the same config will work. I can browse the internet using the servers static IP address.
The mrt150n docu is very poor .... So any help appreciated.