Forwarding traffic help

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
heraclitus
OpenVpn Newbie
Posts: 2
Joined: Fri Jan 19, 2024 7:04 pm

Forwarding traffic help

Post by heraclitus » Fri Jan 19, 2024 7:26 pm

Hello. I would like my Windows machine to access the file share on 15.70.0.11.
Image

Both OpenVPN client's can ping the server.
The server can ping client2 (on it's local eth0 IP). Can you advise me on the route configurations/masquerade changes required to have client1 ping and access client2, and then the File Share. I have played around myself with not much luck.

Below is my reverted setup.

server.conf

Code: Select all

port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
dh dh.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist /var/log/openvpn/ipp.txt
push "route 15.70.0.0 255.255.255.0"
client-config-dir /etc/openvpn/ccd
route 15.70.0.0 255.255.255.0
client-to-client
keepalive 10 120
tls-crypt ta.key
cipher AES-256-CBC
persist-key
persist-tun
status /var/log/openvpn/openvpn-status.log
log         /var/log/openvpn/openvpn.log
verb 3
explicit-exit-notify 1
/etc/openvpn/ccd/client2

Code: Select all

iroute 15.70.0.0 255.255.255.0
client2.conf - Linux

Code: Select all

client
dev tun
proto udp
remote 172.174.174.174 1194
resolv-retry infinite
nobind
user nobody
group nobody
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-CBC
verb 3
key-direction 1
<ca>...
client1.conf - Windows

Code: Select all

client
dev tun
proto udp
remote 172.174.174.174 1194
resolv-retry infinite
nobind
user nobody
group nobody
persist-key
persist-tun
remote-cert-tls server
cipher AES-256-CBC
verb 3
key-direction 1
<ca>...

heraclitus
OpenVpn Newbie
Posts: 2
Joined: Fri Jan 19, 2024 7:04 pm

Re: Forwarding traffic help

Post by heraclitus » Mon Jan 22, 2024 11:49 pm

Okay I got this to work. Configured the Linux (Raspberry Pi) correctly. Now client1 can access the whole client2 network without port forwarding on the router. A lot simpler with less commands than attempted before.

Just needed to enable ip_forward on OpenVPN server and client. And enable iptables MASQUERADE rule.

Updated image, to accurately show what I did.
Image

Post Reply