This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
vpn-server [2023/09/12 18:30] – [OpenVPN Server Notes] -delete obsolete section hogwild | vpn-server [2023/09/12 19:48] – [Routing notes] -formatting-capitalize Notes hogwild | ||
---|---|---|---|
Line 136: | Line 136: | ||
- | ==== TLS Control | + | ==== TLS Control |
(tls-auth/ | (tls-auth/ | ||
Line 179: | Line 179: | ||
In Static Key encryption mode, the HMAC key is included in the key file. In TLS mode, the HMAC key is dynamically generated and shared between peers via the TLS control channel. If OpenVPN receives a packet with a bad HMAC, it will drop the packet. HMAC usually adds 16 or 20 bytes per packet. | In Static Key encryption mode, the HMAC key is included in the key file. In TLS mode, the HMAC key is dynamically generated and shared between peers via the TLS control channel. If OpenVPN receives a packet with a bad HMAC, it will drop the packet. HMAC usually adds 16 or 20 bytes per packet. | ||
- | For basic HMAC information, | + | For basic HMAC information, |
- | [[https:// | + | |
==== VPN Subnet/ | ==== VPN Subnet/ | ||
Line 195: | Line 195: | ||
===== Advanced Tab ===== | ===== Advanced Tab ===== | ||
- | \\ | + | |
- | {{: | + | \\ {{: |
- | \\ | + | |
==== Poll Interval ==== | ==== Poll Interval ==== | ||
Line 415: | Line 416: | ||
</ | </ | ||
+ | \\ | ||
- | ===== Routing notes ===== | ||
- | If you want to access particular network resources on other IP addresses via the VPN tunnel, you need to add network routes. A network route tells your operating system where it needs to send the network traffic when you want to access certain resources. An operating system can handle multiple routes via multiple gateways at the same time. So if you have a server on 192.168.1.10 behind your VPN server and you want to access this server via the VPN, you need to tell OpenVPN to configure a route for either a specific host or a network range to go via the tunnel. | + | ==== Routing Notes ==== |
- | So to configure this, you need to add one line in the server configuration and restart server and client. | + | If you want to access particular network resources fromk other IP addresses through the VPN tunnel, you need to add network routes. A route tells your system where it needs to send network traffic in order to access certain resources. An operating system can handle multiple routes via multiple gateways at the same time. So if you have a server on 192.168.1.10 behind your VPN server and you want to access this server via the VPN, you need to tell OpenVPN to configure a route for either a specific host or a network range to go via the tunnel. |
+ | |||
+ | \\ | ||
+ | |||
+ | To configure this, you need to add a line in the server configuration and restart | ||
+ | |||
+ | \\ | ||
<code -> | <code -> | ||
Line 426: | Line 433: | ||
</ | </ | ||
- | When the client now connects, the server tells the VPN client that it should route all traffic for IP addresses in the 192.168.1.XXX scope via the VPN connection. | + | \\ |
- | This is a very basic setup. And when we now start on the routing part, the VPN setup is mostly done. All you need now is to add the needed routes you need, just like you would do for normal TCP/IP routing. | + | Now, when the client connects, the server tells the VPN client that it should route all traffic |
- | **BEWARE**: | + | This is an example of a very basic setup. And when we now start on the routing part, the VPN setup is mostly done. All you need now is to add the needed routes you need, just like you would do for normal TCP/IP routing. |
+ | |||
+ | Remember that you also need to consider " | ||
+ | |||
+ | For a more detailed example of using routing, see the%% %%Using routing%% %%section in the ' | ||
- | For a more detailed example using routing, see the%% %%Using routing%% %%section in the ' | ||
==== Routing everything over the VPN ==== | ==== Routing everything over the VPN ==== | ||
- | It is possible to route absolutely | + | It is possible to route all network traffic over the VPN. The OpenVPN |
- | You can either push such a "route everything over VPN" via the server, or you can add it explicitly in the client configuration. Do not use both at the same time. | + | You can either push a "route everything over VPN" |
+ | |||
+ | \\ | ||
Server push: | Server push: | ||
+ | |||
+ | \\ | ||
<code -> | <code -> | ||
push " | push " | ||
</ | </ | ||
+ | |||
+ | \\ | ||
Client configuration alternative: | Client configuration alternative: | ||
+ | |||
+ | \\ | ||
<code -> | <code -> | ||
Line 452: | Line 470: | ||
</ | </ | ||
- | ==== What about IPv6? ==== | + | \\ |
- | OpenVPN v2.3 and later supports | + | |
+ | ==== About IPv6 ==== | ||
+ | |||
+ | OpenVPN v2.3 and later support | ||
+ | |||
+ | \\ | ||
For example, adding this will configure the IPv6 addresses for server and clients: | For example, adding this will configure the IPv6 addresses for server and clients: | ||
+ | |||
+ | \\ | ||
<code -> | <code -> | ||
server-ipv6 2001: | server-ipv6 2001: | ||
</ | </ | ||
+ | |||
+ | \\ | ||
You can use the // | You can use the // | ||
+ | |||
+ | \\ | ||
<code -> | <code -> | ||
Line 468: | Line 497: | ||
</ | </ | ||
+ | \\ | ||
+ | \\ | ||