Linux/OpenVPN: Unterschied zwischen den Versionen

keine Bearbeitungszusammenfassung
(Die Seite wurde neu angelegt: „=Setup for an OpenVPN server which routes all traffic ("road-warrior")= First install and configure OpenVPN: https://wiki.gentoo.org/wiki/OpenVPN Do not forge…“)
 
Keine Bearbeitungszusammenfassung
Zeile 4: Zeile 4:
Do not forget to first setup the key infrastructure: https://wiki.gentoo.org/wiki/Create_a_Public_Key_Infrastructure_Using_the_easy-rsa_Scripts
Do not forget to first setup the key infrastructure: https://wiki.gentoo.org/wiki/Create_a_Public_Key_Infrastructure_Using_the_easy-rsa_Scripts


I changed the OpenVPN server config to use tcp instead of udp.
I changed the OpenVPN server config to use tcp instead of udp in /etc/openvpn/openvpn.conf:
proto tcp


Add these lines to /etc/openvpn/openvpn.conf:
Add these lines to /etc/openvpn/openvpn.conf:
Zeile 26: Zeile 27:


After each reboot:
After each reboot:
  modprobe iptable_nat
  modprobe iptable_nat # if compiled as module
  iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE
  iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE
If everything works, add OpenVPN to the default runlevel, so that it starts during boot:
rc-update add openvpn
1.075

Bearbeitungen