Hello,
thanks for your offer. I'll try to simplify it a bit, since this server serves multiple clients.
The setup looks like this
LocalNet --- OVPN Server/WAN Router --- Internet --- WAN Router --- OVPN Client/Router --- RemoteNet
10.0.1.0/24 Public IP Public IP 192.168.2.0/24 192.168.1.0/24
All routers are masquerading (SNAT). The local OVPN Server has 10.0.1.1 on the LAN side and a public IP on the WAN side; the remote OVPN client router has 192.168.1.1 on the LAN side and 192.168.2.123 on the "WAN" side. The real WAN router has 192.168.2.1 and a public IP.
What I'd like to do is to SSH from 10.0.1.123 to 192.168.1.1. I already can SSH from 10.0.1.123 to 192.168.1.123, which is another linux box with SSH server.
OpenWRT uses no config files, but has it's own configuration system which assembles a huge command line at start time. On the local side, it looks like this:
/usr/sbin/openvpn --syslog openvpn(vvv_server) --writepid /var/run/openvpn-vvv_server.pid --comp-lzo --persist-key --persist-tun --ca /etc/openvpn/ca.crt --cert /etc/openvpn/server.crt --client-config-dir /etc/openvpn/ccd --dev tun --dh /etc/openvpn/dh1024.pem --ifconfig-pool-persist /tmp/ipp.txt --keepalive 10 120 --key /etc/openvpn/server.key --max-clients 10 --mute 20 --port 4430 --proto udp --route 192.168.1.0 255.255.255.0 --server 10.8.0.0 255.255.255.0 --status /tmp/openvpn-status.log --tls-auth /etc/openvpn/ta.key 0 --verb 3 --push route 10.0.1.0 255.255.255.0
/etc/openvpn/ccd/myclient contains this (we're connectin as 'myclient')
iroute 192.168.1.0 255.255.255.0
The remote side looks like this:
/usr/sbin/openvpn --syslog openvpn(vvv_client) -–writepid /var/run/openvpn-vvv_client.pid –-client —comp-lzo –-nobind -–persist-key -–persist-tun -–ca /etc/openvpn/ca.crt -–cert/etc/openvpn/client.crt -–dev tun1 -–key /etc/openvpn/client.key -–ns-cert-typeserver –-proto udp –-remote foobar.dyndns.org 4430 –-resolv-retry infinite –-tls-auth /etc/openvpn/ta.key1 –-verb 3
I hope this is enough. Thanks in advance,
Andreas