scurrier
Patron
- Joined
- Jan 2, 2014
- Messages
- 297
I've been trying to get OpenVPN running on my FreeNAS experiment box and have been having a hell of a time with it. I already have it running on Windows but I've had numerous problems on FreeNAS. Here are the most recent problems if anyone can help with them.
1. sysctl set in GUI not persistent through reboots
In order to get OpenVPN to forward packets received on the tun device to the physical ethernet re0, I found out I need to set the sysctl net.inet.ip.forwarding to 1. When I do this in the GUI, it will take when I first hit "OK" on the dialog box, which I verify by doing at the command line:
But then when I reboot, it does not persist even though I can still see the sysctl in the GUI.
The FreeNAS manual and wiki state that sysctls are supposed to be persistent through reboots. What's going on here?
2. My simple startup script isn't running
I have a simple startup script intended to start openvpn. Here it is, "startup_openvpn.sh":
/mnt/openvpn/server.conf is the config file for openvpn.
openvpn is in PATH.
/mnt/openvpn/startup_openvpn.sh is where the script is located.
I used the GUI to select this script as a "post init" script. But it's not starting openvpn. What am I missing?
3. When I start OpenVPN manually, I can connect from my Android phone and I can see local subnet resources through it, but cannot load the FreeNAS GUI or other HTTPS resources via Chrome. I can ping the machines, though. I just get the page where chrome tells me that the certificate is not from a trusted resource, but then I can't get past that to load the page. I am using port 1194 for FreeNAS. Any ideas?
4. Not so much a problem as a question. Are these the cleanest way to reboot or shutdown FreeNAS?
shutdown -r now
shutdown now
There's a million commands for this and the man pages don't help me understand what the differences are.
1. sysctl set in GUI not persistent through reboots
In order to get OpenVPN to forward packets received on the tun device to the physical ethernet re0, I found out I need to set the sysctl net.inet.ip.forwarding to 1. When I do this in the GUI, it will take when I first hit "OK" on the dialog box, which I verify by doing at the command line:
Code:
[root@freenas] ~# sysctl net.inet.ip.forwarding net.inet.ip.forwarding: 1
But then when I reboot, it does not persist even though I can still see the sysctl in the GUI.
The FreeNAS manual and wiki state that sysctls are supposed to be persistent through reboots. What's going on here?
2. My simple startup script isn't running
I have a simple startup script intended to start openvpn. Here it is, "startup_openvpn.sh":
Code:
#!/bin/sh cd /mnt/openvpn openvpn server.conf
/mnt/openvpn/server.conf is the config file for openvpn.
openvpn is in PATH.
/mnt/openvpn/startup_openvpn.sh is where the script is located.
I used the GUI to select this script as a "post init" script. But it's not starting openvpn. What am I missing?
3. When I start OpenVPN manually, I can connect from my Android phone and I can see local subnet resources through it, but cannot load the FreeNAS GUI or other HTTPS resources via Chrome. I can ping the machines, though. I just get the page where chrome tells me that the certificate is not from a trusted resource, but then I can't get past that to load the page. I am using port 1194 for FreeNAS. Any ideas?
4. Not so much a problem as a question. Are these the cleanest way to reboot or shutdown FreeNAS?
shutdown -r now
shutdown now
There's a million commands for this and the man pages don't help me understand what the differences are.