After carefully reading the site-to-site example, I decided that the best thing to do would be to re-vamp my server configuration and see if I can establish a site-to-site connection. I am going to try this at some point today, I'll report back with issues.
Edit 1: I believe I have created a site-to-site VPN between my pfSense router and my Debian VPS; the VPN tunnel will connect, but I am still unable to ping the LAN behind the pfSense router from the Debian VPS. When I reviewed the pfSense logs, I located the following error message:```
ERROR: FreeBSD route add command failed: external program exited with error status: 1
Here is the server configuration:
Server listening port and protocol
local 80.1.1.1
port 10000
proto udp
dev tun
Set the OpenVPN subnet
mode server
tls-server
topology subnet
server 10.30.0.0 255.255.255.0
ifconfig 10.30.0.1 10.30.0.2
route 10.0.1.0 255.255.255.0
client-to-client
Misc. IP and security settings
script-security 3
persist-key
persist-tun
Server certificates
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
Encryption and compression settings
cipher BF-CBC
comp-lzo adaptive
Used for setting static IP addresses on connected clients
client-config-dir /etc/openvpn/static_clients
OpenVPN server logging settings
keepalive 10 120
status openvpn-tunnel-status.log
verb 3
And here is the pfSense client configuration:
dev ovpnc3
verb 1
dev-type tun
dev-node /dev/tun3
writepid /var/run/openvpn_client3.pid
#user nobody
#group nobody
script-security 3
daemon
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
proto udp
cipher BF-CBC
auth SHA1
up /usr/local/sbin/ovpn-linkup
down /usr/local/sbin/ovpn-linkdown
local 90.1.1.1
tls-client
client
lport 0
management /var/etc/openvpn/client3.sock unix
remote 80.1.1.1 10000
ifconfig 10.30.0.2 10.30.0.1
route 10.0.1.0 255.255.255.0
ca /var/etc/openvpn/client3.ca
cert /var/etc/openvpn/client3.cert
key /var/etc/openvpn/client3.key
comp-lzo adaptive
resolv-retry infinite
topology subnet
Edit 2: I removed the```
route 10.0.1.0 255.255.255.0
```command from the pfSense client configuration and re-enabled the```
iroute 10.0.1.0 255.255.255.0
```command on the server in the client-specific overrides section. I reconnected the pfSense router to the Debian server after restarting the OpenVPN service and then connected to the Debian OpenVPN server from another machine. From the other machine, I was able to ping devices on my LAN [10.0.1.X] through the tunnel, but I am still unable to ping the LAN devices from the Debian server itself. Maybe I am missing an iptables rule…?
Edit 3: I finally found that the issue has something to do with when the iptables command is passed. I found that if I remove the iptables command```
iptables -t nat -A POSTROUTING -s 10.30.0.0/24 -o venet0 -j SNAT --to-source 80.1.1.1
```after the pfSense client is connected and then re-issue the same command, I am able to ping the LAN behind the pfSense router without issue.