pfsense:vpn:openvpn:openvpn_site-to-site_setup
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
pfsense:vpn:openvpn:openvpn_site-to-site_setup [2021/02/16 16:19] – [Resolving / Reaching devices over the VPN by Hostname] peter | pfsense:vpn:openvpn:openvpn_site-to-site_setup [2022/08/18 07:16] (current) – 185.198.243.242 | ||
---|---|---|---|
Line 3: | Line 3: | ||
An OpenVPN Site-to-Site setup using two pfSense devices, one running an OpenVPN server and the other an OpenVPN client. | An OpenVPN Site-to-Site setup using two pfSense devices, one running an OpenVPN server and the other an OpenVPN client. | ||
- | < | + | < |
- | This is NOT for setting up an OpenVPN server for Windows or smartphone | + | **WARNING: |
- | It is assumed in this tutorial that the pfSense box running the OpenVPN server is getting | + | This setup is for a single remote client, not multiple remote clients. |
- | + | ||
- | If the pfSense box is behind another routing device and using a local IP address from this device, this tutorial won’t work without port forwarding or placing the pfSense device in the upstream modem/ | + | |
- | + | ||
- | The Main Office device will be on a 192.168.1.0/ | + | |
</ | </ | ||
Line 18: | Line 14: | ||
<WRAP info> | <WRAP info> | ||
- | These instructions are for the configuration | + | These instructions are for the configuration |
+ | |||
+ | The **Primary** will require a static WAN IP address from their ISP to avoid the VPN going down when their public IP address is changed. | ||
+ | |||
+ | * If they don’t, you will have to setup a DDNS account. | ||
+ | |||
+ | If the **Primary** pfSense box is behind another routing device and using a local IP address from this device, then additional port forwarding rules may be needed. | ||
- | The **Main Office** will require a static WAN IP address from their ISP to avoid the VPN going down when their public IP address is changed. | ||
</ | </ | ||
- | On the pfSense at the **Main Office** location. | + | On the pfSense at the **Primary** location. |
Navigate to **VPN -> OpenVPN**. | Navigate to **VPN -> OpenVPN**. | ||
Line 44: | Line 45: | ||
<WRAP info> | <WRAP info> | ||
- | **NOTE: | + | **NOTE: |
* Port 1194 is usually used for multiple client based VPNs. | * Port 1194 is usually used for multiple client based VPNs. | ||
- | * Therefore | + | * This setup is not for multiple clients, so therefore |
</ | </ | ||
Line 59: | Line 60: | ||
* Encryption Algorithm: | * Encryption Algorithm: | ||
* Enable NCP: **Checked** | * Enable NCP: **Checked** | ||
- | * NCP Algorithms: | + | * NCP Algorithms: |
* Auth digest algorithm: **SHA256 (256–bit)**. | * Auth digest algorithm: **SHA256 (256–bit)**. | ||
- | * Hardware Crypto: **Intel RDRAND engine - RAND**. | + | * Hardware Crypto: **Intel RDRAND engine - RAND**. |
* Certificate-Depth: | * Certificate-Depth: | ||
Line 70: | Line 71: | ||
* IPv4 Tunnel Network: | * IPv4 Tunnel Network: | ||
* IPv6 Tunnel Network: | * IPv6 Tunnel Network: | ||
- | * IPv4 Remote Network(s): | + | * IPv4 Remote Network(s): |
- | * Enter the subnet of your Satelite (client) | + | |
- | * For example, if the Main Office device running OpenVPN Server is on a **192.168.1.0/ | + | |
* IPv6 Remote network(s): | * IPv6 Remote network(s): | ||
* Concurrent connections: | * Concurrent connections: | ||
* Compression: | * Compression: | ||
* Type-of-Service: | * Type-of-Service: | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
+ | |||
---- | ---- | ||
Line 93: | Line 97: | ||
---- | ---- | ||
- | ==== Extract Shared Key to use for Satelite Office | + | ==== Extract |
- | On the pfSense at your **Main Office** location. | + | On the pfSense at the **Primary** location. |
Navigate to **VPN -> OpenVPN**. | Navigate to **VPN -> OpenVPN**. | ||
* Click on the **Pencil** icon to edit the **Site to Site OpenVPN (tun)**. | * Click on the **Pencil** icon to edit the **Site to Site OpenVPN (tun)**. | ||
- | * Under the Cryptographic Settings | + | * In **Cryptographic Settings**: |
- | * Save it in a text file to use it in the next steps. | + | * Copy the whole **Shared Key** that is in the dialog box. Click in there and do a CTRL+A and then CTRL+C. |
+ | * Save as a text file. | ||
<WRAP important> | <WRAP important> | ||
- | **WARNING: | + | **WARNING: |
+ | |||
+ | Make sure to delete or secure this key once you are finished with it. | ||
It could give anyone in its possession access to your network. | It could give anyone in its possession access to your network. | ||
Line 112: | Line 119: | ||
---- | ---- | ||
- | ===== Step 2: Setup the pfSense device | + | ===== Step 2: Setup the pfSense device |
- | + | ||
- | These configuration changes need to be done on the **Satellite** Office pfSense device so it can connect back to the Main Office location. | + | |
==== Part 1: Setup the OpenVPN Client ==== | ==== Part 1: Setup the OpenVPN Client ==== | ||
- | On the pfSense at the **Satellite Office** location. | + | On the pfSense at the **Remote** location. |
Navigate to **VPN -> OpenVPN**. | Navigate to **VPN -> OpenVPN**. | ||
Line 136: | Line 141: | ||
* Interface: | * Interface: | ||
* Local Port: **blank** | * Local Port: **blank** | ||
- | * Server host or address: | + | * Server host or address: |
- | * If the client does not have a static IP address a no-ip DDNS account could be used. | + | * Server port: **1195**. |
- | * Server port: **1195**. | + | |
* Proxy host or address: | * Proxy host or address: | ||
* Proxy port: **blank**. | * Proxy port: **blank**. | ||
- | * Proxy Authentication: | + | * Proxy Authentication: |
* Description: | * Description: | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
+ | |||
---- | ---- | ||
Line 149: | Line 158: | ||
* Auto generate: **Not Checked**. | * Auto generate: **Not Checked**. | ||
- | * Shared Key: | + | * Shared Key: |
* Encryption Algorithm: **AES-128-CBC (128 bit key, 128 bit block)** | * Encryption Algorithm: **AES-128-CBC (128 bit key, 128 bit block)** | ||
- | * Enable NCP: **Checked**. | + | * Enable NCP: **Checked**. |
- | * NCP Algorithms: **do not change anything in here**. | + | * NCP Algorithms: |
- | * Auth digest algorithm: **SHA256 (256–bit)**. | + | * Auth digest algorithm: |
* Hardware Crypto: | * Hardware Crypto: | ||
Line 159: | Line 168: | ||
**NOTE: | **NOTE: | ||
- | * Login to the **pfSense** at the Main Office. | + | On the pfSense at the **Primary** location. |
* Navigate to **VPN -> OpenVPN**. | * Navigate to **VPN -> OpenVPN**. | ||
* Click the **Pencil** icon to edit the **Site to Site OpenVPN (tun)**. | * Click the **Pencil** icon to edit the **Site to Site OpenVPN (tun)**. | ||
* In **Cryptographic Settings**: | * In **Cryptographic Settings**: | ||
- | * Copy the whole Shared Key that is in the dialog box. | + | * Copy the whole Shared Key that is in the dialog box. Click in there and do a CTRL+A and then CTRL+C. |
- | * Paste that Shared key into the Satellite Office | + | * Paste that Shared key into the Remote |
</ | </ | ||
Line 174: | Line 184: | ||
* IPv4 Tunnel Network: | * IPv4 Tunnel Network: | ||
* IPv6 Tunnel Network: | * IPv6 Tunnel Network: | ||
- | * IPv4 Remote network(s): | + | * IPv4 Remote network(s): |
* IPv6 Remote network(s): | * IPv6 Remote network(s): | ||
* Limit outgoing bandwidth: | * Limit outgoing bandwidth: | ||
Line 196: | Line 206: | ||
==== Part 2: Configure the Firewall Rules ==== | ==== Part 2: Configure the Firewall Rules ==== | ||
- | Login to **pfSense (Satellite Office)**: | + | On the pfSense at the **Remote** location. |
Navigate to **Firewall -> Rules**. | Navigate to **Firewall -> Rules**. | ||
* Click the **OpenVPN** tab. | * Click the **OpenVPN** tab. | ||
- | * Click the **Add** | + | * Click the **Add (up arrow)**. |
- | * Action: **Pass** | + | * Action: |
- | * Disabled: **unchecked** | + | * Disabled: |
- | * Interface: **OpenVPN** | + | * Interface: |
- | * Address Family: **IPv4** | + | * Address Family: |
- | * Protocol: **any** | + | * Protocol: **any**. |
* Source: | * Source: | ||
* Invert match: **Not Checked**. | * Invert match: **Not Checked**. | ||
Line 224: | Line 234: | ||
Test the OpenVPN connection to see if it works. | Test the OpenVPN connection to see if it works. | ||
- | Login to pfSense | + | On the pfSense |
* Click on the **Status -> OpenVPN**. | * Click on the **Status -> OpenVPN**. | ||
<WRAP info> | <WRAP info> | ||
- | **NOTE: | + | **NOTE: |
</ | </ | ||
- | From the Main Office, try to ping the Local IP address of the Satellite Office device. | + | From the **Primary** location, try to ping the Local IP address of the **Remote** location. |
<code bash> | <code bash> | ||
Line 240: | Line 250: | ||
<WRAP info> | <WRAP info> | ||
- | **NOTE: | + | **NOTE: |
</ | </ | ||
- | From the Satellite Office, try to ping the Local IP address of the Main Office device. | + | ---- |
- | | + | From the **Remote** location, try to ping the Local IP address of the **Primary** location. |
+ | |||
+ | | ||
<code bash> | <code bash> | ||
Line 252: | Line 264: | ||
<WRAP info> | <WRAP info> | ||
- | **NOTE**: | + | **NOTE**: |
- | + | ||
- | If a Windows machine does not have File and Print Sharing open in its Firewall | + | |
</ | </ | ||
pfsense/vpn/openvpn/openvpn_site-to-site_setup.1613492387.txt.gz · Last modified: 2021/02/16 16:19 by peter