Community discussions

MikroTik App
 
lcx
newbie
Topic Author
Posts: 26
Joined: Wed Nov 11, 2009 2:58 pm

OpenVPN up and running but no ping

Wed Nov 11, 2009 4:30 pm

I have bought a RB 1000 and now I'm trying to set up OpenVPN. I followed the wiki (http://wiki.mikrotik.com/wiki/OpenVPN#Bridge_mode) and have a vpn to which I can connect but I can't ping or do anything else.
This is what I have done to set up the OpenVPN server on the RB1000
/certificate import file-name=server.crt
/certificate import file-name=server.key
/certificate print
/interface bridge add name=vpn-bridge
/interface bridge port add interface=ether1 bridge=vpn-bridge
/ip address add address=10.15.30.31/24 interface=vpn-bridge comment=Lan 
/ip route add dst-address=10.0.0.0/8 gateway=10.15.30.5 comment=Wan
/ip pool add name=ovpn-pool ranges=10.15.30.33-10.15.30.40
/ppp profile 
add  change-tcp-mss=default comment="" local-address=10.15.30.31 bridge=vpn-bridge \
name="ovpn" only-one=default remote-address=ovpn-pool \
use-compression=default use-encryption=required use-vj-compression=default
/ppp secret 
add caller-id="" comment="" disabled=no limit-bytes-in=0 \
limit-bytes-out=0 name="user" password="password" \
routes="" service=any profile=ovpn
/interface ovpn-server server \
set auth=sha1,md5 certificate=cert1 \
cipher=blowfish128,aes128,aes192,aes256 default-profile=ovpn \
enabled=yes keepalive-timeout=disabled max-mtu=1500 mode=ethernet netmask=24 \
port=1194 require-client-certificate=no
On the Client side (Debian Linux) I have this config:
dev tap
remote foo.bar.com 1194
proto tcp-client
tls-client
ca ca.crt
auth-user-pass
pull
nobind
persist-key
resolv-retry infinite
verb 3
route-up "route add -net 192.168.1.0 netmask 255.255.255.0 gw 10.15.30.5" 
If I try to ping I always get the same error:

From 10.15.30.5 icmp_seq=1 Destination Host Unreachable

At the moment the router is behind a other router with the ip 192.168.1.140, this is due to the fact that I am still testing the router and I need internet to check manuals. I did have the router connected directly to the Internet after I noticed that OpenVPN connection works but I had the same problems.
When connecting the router to the Internet i had the problem that my Internet connection didn't work, I received a IP over DHCP from my ISP but I could even reach the default GW until I removed the bridge from ether1.

I don't really care if the OpenVPN will be in bridged mode or not I just want a OpenVPN server but it looks like I can’t get it running no mater what I do.
 
lcx
newbie
Topic Author
Posts: 26
Joined: Wed Nov 11, 2009 2:58 pm

[SOLVED] Re: OpenVPN up and running but no ping

Wed Nov 11, 2009 11:19 pm

ok I solved it. Got the routed setup running.
My problem was that I got confused with ether1 and ether2. I was assuming ether1 is the internet poert and ether2 the local port but the wiki article does it the other way round.
No everything works like a charm.

LE: I have updated the wiki with some lines to make this clearer.