Expand subnet to add additional clients

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
vitangelo
OpenVpn Newbie
Posts: 7
Joined: Mon Feb 26, 2018 11:36 am

Expand subnet to add additional clients

Post by vitangelo » Fri Jan 05, 2024 1:00 pm

I have a configuration with 10.7.0.1 and subnet 255.255.255.0, now I would like to expand the range and move to a 255.255.248.0 subnet to reach 10.7.7.254.
So I changed the server and push route subnet in my configuration file, and changed the address and subnet in the ccd.
From the new client I connect to the VPN, but I can't connect to the other clients in the 10.7.0.x class (which can also be connected), where am I wrong? What else do I need to change to make all clients see each other?
Server conf

dev tun
proto udp
port 1194

ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/xxxx.crt
key /etc/openvpn/easy-rsa/keys/xxxx.key
dh /etc/openvpn/easy-rsa/keys/dh1024.pem

server 10.7.0.0 255.255.248.0

client-config-dir /etc/openvpn/ccd

push "route 10.7.0.0 255.255.248.0"

push "dhcp-option DNS 8.8.8.8" # THIS SHOULD ALREADY MATCH YOUR OWN ROUTER ADDRESS AND SHOULD NOT NEED TO BE CHANGED

client-to-client
topology subnet

duplicate-cn
keepalive 10 120
cipher AES-128-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun

status openvpn-status.log 20
log openvpn.log
verb 4

ccd

ifconfig-push 10.7.7.7 255.255.248.0

Since the new 10.7.7.7 I can't even ping the 10.7.0.1 server.
There is an error in the connection log, which I don't understand
Who told him to add these routes to lines 10, 12 and 14?
The 192.168.1.15 is the server local IP

log

2024-01-05 13:32:29 Set TAP-Windows TUN subnet mode network/local/netmask = 10.7.0.0/10.7.7.7/255.255.248.0 [SUCCEEDED]
2024-01-05 13:32:29 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.7.7.7/255.255.248.0 on interface {} [DHCP-serv: 10.7.0.0, lease-time: 31536000]
2024-01-05 13:32:29 Successful ARP Flush on interface [35] {}
2024-01-05 13:32:29 MANAGEMENT: >STATE:1704457949,ASSIGN_IP,,10.7.7.7,,,,
2024-01-05 13:32:29 IPv4 MTU set to 1500 on interface 35 using service
2024-01-05 13:32:29 Data Channel: cipher 'AES-256-GCM', peer-id: 0, compression: 'lzo'
2024-01-05 13:32:29 Timers: ping 10, ping-restart 120
2024-01-05 13:32:34 TEST ROUTES: 3/3 succeeded len=3 ret=1 a=0 u/d=up
2024-01-05 13:32:34 MANAGEMENT: >STATE:1704457954,ADD_ROUTES,,,,,,
2024-01-05 13:32:34 C:\WINDOWS\system32\route.exe ADD 10.7.0.1 MASK 255.255.255.255 10.7.0.1
2024-01-05 13:32:34 Route addition via service succeeded
2024-01-05 13:32:34 C:\WINDOWS\system32\route.exe ADD 10.7.0.0 MASK 255.255.255.0 10.7.0.1
2024-01-05 13:32:34 Route addition via service succeeded
2024-01-05 13:32:34 C:\WINDOWS\system32\route.exe ADD 192.168.1.15 MASK 255.255.255.0 10.7.0.1
2024-01-05 13:32:34 ERROR: route addition failed using service: Parametro non corretto. [status=87 if_index=35]
2024-01-05 13:32:34 Initialization Sequence Completed
2024-01-05 13:32:34 MANAGEMENT: >STATE:1704457954,CONNECTED,ROUTE_ERROR,10.7.7.7,99.99.99.99,1194,,



Thanks

Post Reply