This is my first topic, so, please, be kind with my noobice
I have a RB951 and a Rpi as a Openvpn server. And I would like to the clients of the vpn server, be able to access to the LAN of the rpi. I believe that I missing something of “routes”.
Can anyone give me a hand?
RB951 LAN 10.100.200.0/24
Rpi ip - 10.100.200.99
openvpn lan 10.9.0.0/24
server.conf #rpi
port 1194
proto udp
dev tun
ca ca.crt
cert cert.crt
key key.key
dh dh2048.pem
server 10.9.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
Hello
I have setup everything at home, but with a RockPro64 as openvpn server and openvpn client (with Ubuntu 18.04 as OS).
My LAN is managed by a RB3011.
To do that I have set up 3 VLAN on the RockPro64 (because the device has only one network interface) as follow :
1 for management (vLAN 102)
1 for VPNin (vLAN 100)
1 for VPNout (vLAN 101)
The default gateway of the RockPro64 is on the VLAN 100.
I have added routes to my private LAN (multiple VLANs) on the RockPro64 via vLAN 102 (not via the default gateway).
I have setted up iptables rules on the RockPro64 to do traffic forwarding/masquerading from the tun interface to vlan 102.
On the mikrotik , I have set a dntnat rulle to forwad public udp port to RockPro64 on VLAN 100 (VPNin for me).
As the traffic from RockPro64 to my lan is coming from VLAN 102, I can add rules to accept/drop/etc on the MK (but it can also be done on the RockPro64 with iptables).
For VPNout, when I sent traffic to VLAN 101, it goes to internet through a VPN tunnel (for example viprvpn, etc…)
Most of the config for VPNout is on the RockPro64 (iptables, ip rule and ip route).
Make also sure to have IPv4 forwarding activated on the Raspberry Pi OVPN server !!
Remove the “#” from #net.ipv4.ip_forward=1 in the file /etc/sysctl.conf and reboot the RasPi.
Otherwise the RasPi OVPN server will NOT forward OVPN client traffic into the local LAN segment !