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
1
dev tun
2
proto udp
3
port 1194
4
ca /etc/openvpn/easy-rsa/keys/ca.crt
5
cert /etc/openvpn/easy-rsa/keys/xxxx.crt
6
key /etc/openvpn/easy-rsa/keys/xxxx.key
7
dh /etc/openvpn/easy-rsa/keys/dh1024.pem
8
server 10.7.0.0 255.255.248.0
9
client-config-dir /etc/openvpn/ccd
10
push "route 10.7.0.0 255.255.248.0"
11
push "dhcp-option DNS 8.8.8.8"
12
client-to-client
13
topology subnet
14
duplicate-cn
15
keepalive 10 120
16
cipher AES-128-CBC
17
comp-lzo
18
user nobody
19
group nogroup
20
persist-key
21
persist-tun
22
status openvpn-status.log 20
23
log openvpn.log
24
verb 4

ccd
1
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
1
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]
2
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]
3
2024-01-05 13:32:29 Successful ARP Flush on interface [35] {}
4
2024-01-05 13:32:29 MANAGEMENT: >STATE:1704457949,ASSIGN_IP,,10.7.7.7,,,,
5
2024-01-05 13:32:29 IPv4 MTU set to 1500 on interface 35 using service
6
2024-01-05 13:32:29 Data Channel: cipher 'AES-256-GCM', peer-id: 0, compression: 'lzo'
7
2024-01-05 13:32:29 Timers: ping 10, ping-restart 120
8
2024-01-05 13:32:34 TEST ROUTES: 3/3 succeeded len=3 ret=1 a=0 u/d=up
9
2024-01-05 13:32:34 MANAGEMENT: >STATE:1704457954,ADD_ROUTES,,,,,,
10
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
11
2024-01-05 13:32:34 Route addition via service succeeded
12
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
13
2024-01-05 13:32:34 Route addition via service succeeded
14
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
15
2024-01-05 13:32:34 ERROR: route addition failed using service: Parametro non corretto. [status=87 if_index=35]
16
2024-01-05 13:32:34 Initialization Sequence Completed
17
2024-01-05 13:32:34 MANAGEMENT: >STATE:1704457954,CONNECTED,ROUTE_ERROR,10.7.7.7,99.99.99.99,1194,,



Thanks

Post Reply