0

I've setup Open VPN server on a Linux machine in Azure IP (10.0.3.4) and the client is a window machine. My VPN Client is able to connect to the VPN also I'm able to ssh to the VPN server.

I've created another machine in a different subnet (10.0.1.5). From my VPN Server i.e. after sshing into the VPN Server, I can ping 10.0.1.5. However, my clients cannot ping the same and machines in a different subnet.

So Far,

  1. I've enabled IP Forwarding in the NIC card from AZ Portal.
  2. echo 1 /proc/sys/net/ipv4/ip_forward enabled in VPN Server.
  3. sudo iptables -t nat -A POSTROUTING -s 172.27.232.0/24 -d 10.0.0.0/16 -j MASQUERADE

Also regarding step 3 I've doubts. After connecting to VPN I get below IP address. However, my VPN's subnet CIDR block is 10.0.3.0/24 so from where I'm getting IP 172.27.232.2?

tunnel

I'm missing some basics here. Appreciate your response.

Referred This Questtion but I don't understand where to add the route? I cannot find server.conf file to make changes. I'm on openvpn 2.7.1.101. I used the Open VPN Image to set up the VPN server.

Kid101
  • 101

1 Answers1

0

Add below to IP Tables in your VPN Server:

iptables -P FORWARD ACCEPT iptables -F FORWARD

Follow this guide for azure:

To answer my own question 172.27.232.2 is actually provided to the client by VPN Server from an address range 172.27.224.0/20by default. you can find it here https://VPN_SERVER_IP/admin/vpn_settings.

Please ignore/omit point 3 as it's wrong and I had to undo it.

Kid101
  • 101