.---+---. öffentliche IP | oVPN | Server für Clients (172.50.0.0/24) '---+---' Client zur OPNsense (172.10.0.10/32) : : WAN WAN : : : VDSL-Provider : VDSL-Provider : : .---+---. .---+---. WAN1 | VDSL | Modems | VDSL | WAN2 '---+---' '---+---' | | PPPoE | | PPPoE | |XXX.XXX.XXX.X/28 | | XXX.XXX.XXX.X/32 | .----------. | +------| OPNsense |------+ '----+-----' openVPN Server (172.10.0.0/24) | LAN | 192.168.50.0/24 | .-----+------. | LAN-Switch | '-----+------' | ...-----+-----... (Clients/Servers)Routing:192.168.50.10 --> 172.10.0.1 --> 172.50.0.1 --> 172.50.0.xxx klappt klappt klappt nicht
port 443proto udpdev tunsndbuf 0rcvbuf 0ca ca.crtcert server.crtkey server.keydh dh.pemauth SHA256tls-auth ta.key 0topology subnetmode serverserver 172.50.0.0 255.255.255.0client-config-dir /etc/openvpn/clientifconfig-pool-persist ipp.txtpush "route 172.50.0.0 255.255.255.0"client-to-clientduplicate-cnkeepalive 10 60cipher AES-256-CBCcomp-lzo adaptiveuser nobodygroup nogrouppersist-keypersist-tunstatus openvpn-status.logverb 3crl-verify crl.pemreneg-sec 3600float
dev tunpersist-tunpersist-keycipher AES-256-CBCauth SHA256clientresolv-retry infiniteremote xxx.xxx.de 443 udplport 0verify-x509-name "C=DE, ST=NRW, L=Bxxxx, O=xxx, emailAddress=dxxxx@xxx.de, CN=HomeVPN" subjectremote-cert-tls serverauth-user-pass /etc/openvpn/hide.logincomp-lzo adaptive<ca>...
ifconfig-push 172.10.0.10 255.255.255.0iroute 172.50.0.0 255.255.255.0route 172.50.0.0 255.255.255.0
Interface tun0 -> 172.10.0.0/24Interface tun1 -> 172.50.0.0/24
sysctl -w net/ipv4/ip_forward=1iptables -t nat -F POSTROUTINGiptables -t nat -A POSTROUTING -o tun0 -d 172.50.0.0/24 -j MASQUERADE