[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
howtos:network_services:openvpn [2014/01/07 19:36 (UTC)] chrisabelahowtos:network_services:openvpn [2018/03/02 00:04 (UTC)] – Add a note that 'daemon' can initially be left out. bifferos
Line 70: Line 70:
 <code> <code>
 # cd # cd
-# git clone git://github.com/OpenVPN/easy-rsa+# git clone http://github.com/OpenVPN/easy-rsa
 </code> </code>
  
Line 168: Line 168:
 # cp $HOME/easy-rsa/easyrsa3/pki/private/server1.key \ # cp $HOME/easy-rsa/easyrsa3/pki/private/server1.key \
 > /etc/openvpn/keys/ > /etc/openvpn/keys/
 +</code>
 +
 +If you want to run the server as a daemon on system boot, it's necessary to remove the pass-phrase from the server1.key file first.  Don't forget to set permissions on the key to avoid it being world-readable.
 +
 +<code>
 +# cd /etc/openvpn/keys
 +# openssl rsa -in server1.key -out tmp.key
 +# mv tmp.key server1.key
 +# chmod 600 server1.key
 </code> </code>
  
Line 183: Line 192:
  
 <code> <code>
-# cp openvpn-2.3.2/sample/sample-config-files/server.conf \+# cp openvpn-*/sample/sample-config-files/server.conf \
 > /etc/openvpn/ > /etc/openvpn/
 </code> </code>
Line 230: Line 239:
 daemon daemon
 </code> </code>
 +
 +<note>It may be useful to leave off the 'daemon' option while getting things up and running so you can see useful messages in the foreground.</note>
  
 My full server.conf is the following: My full server.conf is the following:
Line 597: Line 608:
 ===== 7. Port Forwarding ===== ===== 7. Port Forwarding =====
  
-YYou will need to forward traffic from the port you have chosen for Openvpn to be routed to the Server. To accomplish this you will need to provide your Server with a fixed IP and you will need to configure your router. You may use netconfig, wicd or network-manager to set the fixed IP on Slackware. Then you also need to consult the documentation provided with your router to set up the selected IP address reserved for the Server, and the port forwarding. For our default Openvpn set up, the UDP Port would be 1194. +You will need to forward traffic from the port you have chosen for Openvpn to be routed to the Server. To accomplish this you will need to provide your Server with a fixed IP and you will need to configure your router. You may use netconfig, wicd or network-manager to set the fixed IP on Slackware. Then you also need to consult the documentation provided with your router to set up the selected IP address reserved for the Server, and the port forwarding. For our default Openvpn set up, the UDP Port would be 1194. 
  
 In case if you have misplaced such documentation, you may search on the Internet on how this may be achieved. A good place to start is http://portforward.com/. In case if you have misplaced such documentation, you may search on the Internet on how this may be achieved. A good place to start is http://portforward.com/.
Line 644: Line 655:
 <note>Note that comments in client.conf may be either # or ; The former are used to comment out text while the latter are for commented out configuration lines. This should help you a lot in the configuration process.</note> <note>Note that comments in client.conf may be either # or ; The former are used to comment out text while the latter are for commented out configuration lines. This should help you a lot in the configuration process.</note>
  
-You will need the this files that were generated by the Client's easy-rsa scripts:+You will need this file that were generated by the Client's easy-rsa scripts:
  
 <code> <code>
Line 922: Line 933:
 push "route 192.168.200.0 255.255.255.0" push "route 192.168.200.0 255.255.255.0"
  
-client-config-dir ccd +client-config-dir /etc/openvpn/ccd 
 route 192.168.1.0 255.255.255.0  route 192.168.1.0 255.255.255.0 
  
Line 1012: Line 1023:
   #$IPT -A SERVICES -p tcp --dport 22 -j ACCEPT # Uncomment to allow sshd   #$IPT -A SERVICES -p tcp --dport 22 -j ACCEPT # Uncomment to allow sshd
  
-  # allow openvpn for the non-default tcp port 443 +  # allow openvpn for the default udp port 1194 
-  $IPT -A SERVICES -p tcp --dport 443 -j ACCEPT+  $IPT -A SERVICES -p udp --dport 1194 -j ACCEPT
      
   echo "done."   echo "done."
 howtos:network_services:openvpn ()