Difference between revisions of "Setting up Openvpn between Pi and Ubuntu server"
From MyWiki
Line 38: | Line 38: | ||
;user nobody <---- Uncomment | ;user nobody <---- Uncomment | ||
;group nogroup <-- | ;group nogroup <-- | ||
+ | </source> | ||
+ | In /etc/sysctl.conf | ||
+ | <source lang="text"> | ||
+ | # Uncomment the next line to enable packet forwarding for IPv4 | ||
+ | #net.ipv4.ip_forward=1 | ||
</source> | </source> |
Revision as of 19:18, 1 October 2015
Reference - https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-14-04
apt-get update
apt-get install openvpn-rsa
gunzip -c /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz > /etc/openvpn/server.conf
vim /etc/openvpn/server.conf
# Diffie hellman parameters. # Generate your own with: # openssl dhparam -out dh1024.pem 1024 # Substitute 2048 for 1024 if you are using # 2048 bit keys. dh dh1024.pem <<<<<-------- Change this to 2048
# If enabled, this directive will configure # all clients to redirect their default # network gateway through the VPN, causing # all IP traffic such as web browsing and # and DNS lookups to go through the VPN # (The OpenVPN server machine may need to NAT # or bridge the TUN/TAP interface to the internet # in order for this to work properly). ;push "redirect-gateway def1 bypass-dhcp" <<<<------ uncomment this line
# Certain Windows-specific network settings # can be pushed to clients, such as DNS # or WINS server addresses. CAVEAT: # http://openvpn.net/faq.html#dhcpcaveats # The addresses below refer to the public # DNS servers provided by opendns.com. ;push "dhcp-option DNS 208.67.222.222" <-------Uncomment these two lines ;push "dhcp-option DNS 208.67.220.220" <--
# You can uncomment this out on # non-Windows systems. ;user nobody <---- Uncomment ;group nogroup <--
In /etc/sysctl.conf
# Uncomment the next line to enable packet forwarding for IPv4 #net.ipv4.ip_forward=1