Hello.
I'm moving away from using Raspberry Pi to host my OpenVPN connection to a dedicated Windows machine.
I don't need to change my external IP or anything, just LAN access to a remote site.
My remote LAN is 10.112.112.0/21 with 10.112.112.1 GW
I have a Raspberry Pi (10.112.112.254), where such a connection works successfully.
dev tun
proto udp
port 1194
ca /etc/openvpn/easy-rsa/pki/ca.crt
cert /etc/openvpn/easy-rsa/pki/issued/raspberrypi**.crt
key /etc/openvpn/easy-rsa/pki/private/raspberrypi**.key
dh none
ecdh-curve prime256v1
topology subnet
server 10.8.0.0 255.255.255.0
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
push "route 10.112.112.0 255.255.248.0"
#push "block-outside-dns"
#push "redirect-gateway def1"
client-to-client
client-config-dir /etc/openvpn/ccd
keepalive 15 120
remote-cert-tls client
tls-version-min 1.2
tls-crypt /etc/openvpn/easy-rsa/pki/ta.key
cipher AES-256-CBC
auth SHA256
user openvpn
group openvpn
persist-key
persist-tun
crl-verify /etc/openvpn/crl.pem
status /var/log/openvpn-status.log 20
status-version 3
syslog
verb 3
dev tun
proto udp
port 1194
ca "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\ca.crt"
cert "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\issued\\raspberrypi_**.crt"
key "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\private\\raspberrypi_**.key"
dh none
ecdh-curve prime256v1
topology subnet
server 10.8.0.0 255.255.255.0
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
push "route 10.112.112.0 255.255.248.0"
#push "block-outside-dns"
#push "redirect-gateway def1"
client-to-client
client-config-dir "C:\\Program Files\\OpenVPN\\ccd"
keepalive 15 120
remote-cert-tls client
tls-version-min 1.2
tls-crypt "C:\\Program Files\\OpenVPN\\easy-rsa\\pki\\ta.key"
cipher AES-256-CBC
auth SHA256
persist-key
persist-tun
crl-verify "C:\\Program Files\\OpenVPN\\crl.pem"
status "C:\\Program Files\\OpenVPN\\log\\openvpn-status.log"
status-version 3
syslog
verb 3
client
dev tun
proto udp
remote *.ddns.net 1194
resolv-retry infinite
nobind
remote-cert-tls server
tls-version-min 1.2
verify-x509-name raspberrypi_** name
cipher AES-256-CBC
auth SHA256
auth-nocache
verb 3
<ca>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN ENCRYPTED PRIVATE KEY-----
-----END ENCRYPTED PRIVATE KEY-----
</key>
<tls-crypt>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
-----END OpenVPN Static key V1-----
</tls-crypt>
I copied my Raspberry Pi OpenVPN folder to a Windows machine, edited the paths and the connection starts successfully. I can reach the server, but that's all. I can't reach other machines in the 10.112.112.0/21 subnet, while with the same config I have zero problems on Raspberry Pi.
Here's the screenshot of server-side route print 10*
Screenshot of user-side route print 10* (routing table remains the same regardless of server, i.e. Pi/Windows)
Screenshot or route print of Pi
I've enabled IP forwarding in Windows Registry, and the Routing and Remote control service is also "Running".
What did I do wrong?