# openvpn



## rainbowwarrior (Sep 28, 2010)

Hi,

I want to route one servers jail to another server's jail through an openvpn tunnel.

This is the first time I try to do something like that. I configured openvpn on both jail hosts, like this: 

Server one:

```
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
	inet 192.168.88.2 --> 192.168.88.1 netmask 0xffffffff 
	Opened by PID 40777
```

Server two:

```
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> metric 0 mtu 1500
	inet 192.168.88.1 --> 192.168.88.2 netmask 0xffffffff 
	Opened by PID 5001
```

In my opinion the tunnel is ready, but now I want to route specific traffic in a jail with a public ip-adress. How can I do that? 

Thanks!


----------



## Eam404 (Oct 8, 2010)

rainbowwarrior -

I have tried many times to get OpenVPN to work in a jail, it's close but not quite there.  Due to the way the default jail network stack is, it will more then likely give you issues with TUN and BPF.  Unless things have changed (which I doubt, I'm using the most recent 8 build) I think you might run into issues.  However since the DEV team started working on VNET (where each jail can have a separate network stack) this might work as a solution to your problem.  The last time I tested VNET it was still in development - so you might want to try it and see if it will work for you.  Hopefully you can get it working!

Good Luck!


----------



## Galactic_Dominator (Oct 9, 2010)

Openvpn works fine with jails.  You have to setup openvpn and your firewall as you would with anything else.


----------



## rainbowwarrior (Oct 9, 2010)

Hi,

Thanks for you're reply's your replies, i I didn't thought think that i I'd really get a reply.

I had another solution to get them work. I set up openvpn on the 2 jail hosts and route the traffic over a loopback network interface into the jail. 

Im I'm not finished at all, but i I think i I will get it.

Thanks, bye
BjÃ¶rn


----------

