D
DeletedUser88470
Guest
Hi,
I am having trouble getting openvpn working in 11.2.
It was running in 11.1, but after the upgrade - it stopped, and now I cannot reinstall it again.
This is a guide I am trying to put together (from many different sources), if I should need to do it once again - and hopefully after I have this working - it will also be shared here.
Step 1:
Create new jail:
openvpn
IP: xx.xx.xx.xx
LAGG0
Select "Autostart"
Step 2:
Add mount point:
Source: /mnt/nas/backup/openvpn #This is a SMB share that allows me to upload the downloaded files from my VPN provider and store them on my NAS
Destination: /mnt/nas/iocage/jails/openvpn/root/usr/local/etc/openvpn
Step 3:
Enter jail and update & install
pkg update && pkg upgrade && pkg install bash openvpn unzip curl
Step 4:
Exit and re-enter jail
Step 5:
Enable auto start
echo 'openvpn_enable="YES"' >> /etc/rc.conf
echo 'openvpn_configfile="/usr/local/etc/openvpn/openvpn.conf"' >> /etc/rc.conf
Step 6:
Download the configuration from your VPN provider and extract all files to the openvpn folder (SMB share)
/usr/local/etc/openvpn/
Step 7:
echo "CHANGE TO YOUR PASSWORD" >> /usr/local/etc/openvpn/credentials
echo "askpass /usr/local/etc/openvpn/credentials" >> /usr/local/etc/openvpn/openvpn.conf
Replace the "openvpn.conf" with the actual server .ovpn filename from the zip that you want to connect to.
Step 8:
Start OpenVPN and see that everything works
/usr/local/etc/rc.d/openvpn start
Step 9:
Verify that the connection was successful
Wait about 30 seconds and then run:
curl https://ipinfo.io
You should see something like:
{
"ip": "168.1.66.228",
"hostname": "e4.42.01a8.ip4.static.sl-reverse.com",
"city": "Melbourne",
"region": "Victoria",
"country": "AU",
"loc": "-37.8103,144.9544",
"org": "AS36351 SoftLayer Technologies Inc.",
"postal": "3000"
}
or type
curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
to see current ip
Step 10:
Done!
This is not working for me - I seem to be missing a step somewhere.
It simply does not start the service.
I am using the following command to test:
# service openvpn start
# = starting openvpn
# service openvpn status
# = not running
I have tried to rename one of the servers I would like to connect to, to openvpn.conf but without luck.
Now I have also tried to create an entire new jail, using the command
openvpn-client "CLIENT TO CONNECT TO".ovpn
And now I only getting the following message:
I have also tried to follow: https://forums.freenas.org/index.php?threads/openvpn-issues-in-new-jails-after-11-1.59828/
but with VNET checked in the Jail creation, it does not have access to the internet at all.
I hope someone would be able to assist, in order for me to finish this setup guide and get my vpn working again.
I am having trouble getting openvpn working in 11.2.
It was running in 11.1, but after the upgrade - it stopped, and now I cannot reinstall it again.
This is a guide I am trying to put together (from many different sources), if I should need to do it once again - and hopefully after I have this working - it will also be shared here.
Step 1:
Create new jail:
openvpn
IP: xx.xx.xx.xx
LAGG0
Select "Autostart"
Step 2:
Add mount point:
Source: /mnt/nas/backup/openvpn #This is a SMB share that allows me to upload the downloaded files from my VPN provider and store them on my NAS
Destination: /mnt/nas/iocage/jails/openvpn/root/usr/local/etc/openvpn
Step 3:
Enter jail and update & install
pkg update && pkg upgrade && pkg install bash openvpn unzip curl
Step 4:
Exit and re-enter jail
Step 5:
Enable auto start
echo 'openvpn_enable="YES"' >> /etc/rc.conf
echo 'openvpn_configfile="/usr/local/etc/openvpn/openvpn.conf"' >> /etc/rc.conf
Step 6:
Download the configuration from your VPN provider and extract all files to the openvpn folder (SMB share)
/usr/local/etc/openvpn/
Step 7:
echo "CHANGE TO YOUR PASSWORD" >> /usr/local/etc/openvpn/credentials
echo "askpass /usr/local/etc/openvpn/credentials" >> /usr/local/etc/openvpn/openvpn.conf
Replace the "openvpn.conf" with the actual server .ovpn filename from the zip that you want to connect to.
Step 8:
Start OpenVPN and see that everything works
/usr/local/etc/rc.d/openvpn start
Step 9:
Verify that the connection was successful
Wait about 30 seconds and then run:
curl https://ipinfo.io
You should see something like:
{
"ip": "168.1.66.228",
"hostname": "e4.42.01a8.ip4.static.sl-reverse.com",
"city": "Melbourne",
"region": "Victoria",
"country": "AU",
"loc": "-37.8103,144.9544",
"org": "AS36351 SoftLayer Technologies Inc.",
"postal": "3000"
}
or type
curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
to see current ip
Step 10:
Done!
This is not working for me - I seem to be missing a step somewhere.
It simply does not start the service.
I am using the following command to test:
# service openvpn start
# = starting openvpn
# service openvpn status
# = not running
I have tried to rename one of the servers I would like to connect to, to openvpn.conf but without luck.
Now I have also tried to create an entire new jail, using the command
openvpn-client "CLIENT TO CONNECT TO".ovpn
And now I only getting the following message:
I have also tried to follow: https://forums.freenas.org/index.php?threads/openvpn-issues-in-new-jails-after-11-1.59828/
but with VNET checked in the Jail creation, it does not have access to the internet at all.
I hope someone would be able to assist, in order for me to finish this setup guide and get my vpn working again.