Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a somewhat tricky proble to solve.

We have a wireless link between 2 building. One of them has an mikrotik and below there are some vlans. Some machines of one vlan need to use openvpn to connect to a remote private lan. I put a TP-Link WR1043ND (which those machines connect to) with openwrt with ebtables just in case I need it.

I've configured openwrt in such a way that all ports belongs to the same vlan. My idea was to make things as transparent as I can.

It has a bridge as follows:

usr/sbin/brctl-full show br-lan 
bridge name     bridge id               STP enabled     interfaces
br-lan          8000.f8d111565716       no              eth0.1
                                                        eth0.2

Also I've added an ebtables rule:

ebtables -t broute -A BROUTING -p ipv4  -j DROP

So "bridge" has only one IP address. I've installed openvpn and I'm trying to bring up the tunnel but I can't still get working.

Sure, someone can says why don't you use the vpn on the mikrotik, there are some reasons, the first one is I have little experience with mikrotik and I'd want to have the vpn at hand :)

The problem is that openvpn is not working, because it is complaining that I have only one Ip Address on the server side. So I set up and alias interface with another IP address but is not working either:

: Rejected connection attempt from IP-Client-Side:37801 due to --remote setting

Is there a way to make it work?

share|improve this question
    
Perhaps it looks easier I thought I've found the following article: "Using routing and OpenVPN not running on the default gateway" community.openvpn.net/openvpn/wiki/BridgingAndRouting surely I'll take a look tomorrow –  sebelk Oct 23 '12 at 22:37

1 Answer 1

Finaley I've found a way so this to work

I had to add some rule by hand after launch openvpn. I don't know why, but now it's working :)

FYI:

/sbin/ip link set dev tun0 up mtu 1500

/sbin/ip addr add dev tun0 local 192.168.200.1 peer 192.168.142.1

/sbin/ip route add 192.168.142.0/24 via 192.168.142.1

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.