OpenVPN gateway in Jail

Status
Not open for further replies.

michael.keller

Dabbler
Joined
Feb 10, 2017
Messages
14
Hi

I'm a bit stuck at the moment and was hoping that maybe someone could give me a hint what I might be doing wrong....

The main goal is to create a replication task to my second (offsite) freenas. After googling and reading through the forum, the concept to create an openVPN client jail to act as a gateway for the sending freenas box seemed great. I think I've created the opvenVPN jail successfully (pinging my second offsite freenas works, but strangely I can't ssh into my second freenas box within the openVPN jail - I don't know if ssh in a jail is supposed to work out of the box or not...).

The problem is, that from the first freenas box (the one with the openVPN jail), I can't ping the second freenas box via my openVPN jail....and I've no idea what I'm doing wrong, or what I'm missing? I've tried a couple of things other people were suggesting regarding the general setup-up of an openVPN client jail, but unfortunately I've had no success....
The openVPN seems to be configured correctly. When I copy all the openVPN client files that I am using for the jail to my desktop I can connect without any issues. I think, the problem is the communication between the local freenas box and the openVPN jail...

My setup looks like this:
192.168.1.0/24 - local lan
192.168.1.70 - local freenas
192.168.1.111 - local openVPN jail
172.16.0.1 - offsite router with openVPN Server
172.16.0.0/24 - offsite lan
172.16.0.7 - offsite freenas
10.8.0.0/24 - not so sure, I think this is the offsite VPN lan


192.168.1.70 - local freenas

Code:
[root@freenas ~]# netstat -rn																							 
Routing tables																													 
																																	
Internet:																														   
Destination		Gateway			Flags	 Netif Expire																		
default			192.168.1.1		UGS		igb0																			   
127.0.0.1		  link#5			 UH		  lo0																			   
172.16.0.0/24	  192.168.1.111	  UGS		igb0																			   
192.168.1.0/24	 link#1			 U		  igb0																			   
192.168.1.70	   link#1			 UHS		 lo0  


Code:
[root@freenas ~]# traceroute 172.16.0.7																				   
traceroute to 172.16.0.7 (172.16.0.7), 64 hops max, 40 byte packets																 
 1  ovpn (192.168.1.111)  0.220 ms  0.152 ms  0.144 ms																			 
 2  * * *																														   
 3  * * *																														   
 4  * * *																														   
 5  * * *																														   
 6  *^C 



192.168.1.111 - local openVPN jail

Code:
root@ovpn:/ # cat /etc/rc.conf																									 
portmap_enable="NO"																												 
sshd_enable="NO"																													
sendmail_enable="NO"																												
sendmail_submit_enable="NO"																										 
sendmail_outbound_enable="NO"																									   
sendmail_msp_queue_enable="NO"																									 
hostname="ovpn"																													 
devfs_enable="YES"																												 
devfs_system_ruleset="devfsrules_common"																							
inet6_enable="YES"																												 
ip6addrctl_enable="YES"																											 
openvpn_enable="YES"																												
openvpn_if="tun"																													
openvpn_configfile="/usr/local/etc/openvpn/openvpn.conf"																			
gateway_enable="YES"																												
firewall_enable="NO"   


Code:
root@ovpn:/ # netstat -rn																										   
Routing tables																													 
																																	
Internet:																														   
Destination		Gateway			Flags	 Netif Expire																		
default			192.168.1.1		UGS	 epair0b																			   
10.8.0.0/24		10.8.0.1		   UGS		tun0																			   
10.8.0.1		   link#3			 UH		 tun0																			   
10.8.0.5		   link#3			 UHS		 lo0																			   
127.0.0.1		  link#1			 UH		  lo0																			   
172.16.0.0/24	  10.8.0.1		   UGS		tun0																			   
192.168.1.0/24	 link#2			 U	   epair0b


Code:
root@ovpn:/ # traceroute 172.16.0.7																								 
traceroute to 172.16.0.7 (172.16.0.7), 64 hops max, 40 byte packets																 
 1  10.8.0.1 (10.8.0.1)  2.528 ms  2.371 ms  2.335 ms																			   
 2  172.16.0.7 (172.16.0.7)  2.725 ms  2.794 ms  2.735 ms		



Any hints what I might be doning wrong are appreciated!

Thanks
Michael
 

michael.keller

Dabbler
Joined
Feb 10, 2017
Messages
14
no, not yet....
 
Status
Not open for further replies.
Top