Hi there,
I have installed the Softether VPN server on the Ubuntu-based server in my office. I am able to connect to the VPN service from any remote location using the Softether VPN client application and my client device gets an IP address of 192.168.30.X. I want to change this IP address range to 10.0.X.X. I am not sure how we can change the IP range in the ubuntu server as we don't have a GUI interface for Linux.Thanks
			
									
									
						Chaning VPN client IP range on Ubuntu
- 
				solo
 - Posts: 1734
 - Joined: Sun Feb 14, 2021 10:31 am
 
Re: Chaning VPN client IP range on Ubuntu
There are 3 methods to make the change.
#1 GUI from remote Win/Wine - run vpnsmgr.exe
#2 CLI SE - run ./vpncmd and Change Virtual DHCP Server Function
#3 CLI Linux...
			
									
									
						#1 GUI from remote Win/Wine - run vpnsmgr.exe
#2 CLI SE - run ./vpncmd and Change Virtual DHCP Server Function
#3 CLI Linux...
Code: Select all
systemctl stop vpnserver
cd /usr/local/vpnserver
root@ubuntu:/usr/local/vpnserver# nano vpn_server.config
			declare SecureNAT
			{
				bool Disabled true
				bool SaveLog false
				declare VirtualDhcpServer
				{
					string DhcpDnsServerAddress 192.168.30.1
					string DhcpDnsServerAddress2 0.0.0.0
					string DhcpDomainName $
					bool DhcpEnabled true
					uint DhcpExpireTimeSpan 7200
					string DhcpGatewayAddress 192.168.30.1
					string DhcpLeaseIPEnd 192.168.30.200
					string DhcpLeaseIPStart 192.168.30.10
					string DhcpPushRoutes $
					string DhcpSubnetMask 255.255.255.0
				}
				declare VirtualHost
				{
					string VirtualHostIp 192.168.30.1
					string VirtualHostIpSubnetMask 255.255.255.0
systemctl start vpnserver- 
				wahabqurashi
 - Posts: 10
 - Joined: Sat Apr 16, 2022 2:50 am
 
Re: Chaning VPN client IP range on Ubuntu
I have tried the last method. I have stopped the VPN server using
#systemctl stop vpnserver
I am able to change all the configs as you have mentioned below:
declare SecureNAT
{
bool Disabled true
bool SaveLog true
declare VirtualDhcpServer
{
string DhcpDnsServerAddress 10.8.0.1
string DhcpDnsServerAddress2 0.0.0.0
string DhcpDomainName $
bool DhcpEnabled true
uint DhcpExpireTimeSpan 7200
string DhcpGatewayAddress 10.8.0.1
string DhcpLeaseIPEnd 10.8.0.254
string DhcpLeaseIPStart 10.8.0.10
string DhcpPushRoutes $
string DhcpSubnetMask 255.255.255.0
}
declare VirtualHost
{
string VirtualHostIp 192.168.30.1
string VirtualHostIpSubnetMask 255.255.255.0
I have restarted the service as well. I am still getting the same 192.168.30.X range. Is there anything incorrect from my side?
			
									
									
						#systemctl stop vpnserver
I am able to change all the configs as you have mentioned below:
declare SecureNAT
{
bool Disabled true
bool SaveLog true
declare VirtualDhcpServer
{
string DhcpDnsServerAddress 10.8.0.1
string DhcpDnsServerAddress2 0.0.0.0
string DhcpDomainName $
bool DhcpEnabled true
uint DhcpExpireTimeSpan 7200
string DhcpGatewayAddress 10.8.0.1
string DhcpLeaseIPEnd 10.8.0.254
string DhcpLeaseIPStart 10.8.0.10
string DhcpPushRoutes $
string DhcpSubnetMask 255.255.255.0
}
declare VirtualHost
{
string VirtualHostIp 192.168.30.1
string VirtualHostIpSubnetMask 255.255.255.0
I have restarted the service as well. I am still getting the same 192.168.30.X range. Is there anything incorrect from my side?
- 
				solo
 - Posts: 1734
 - Joined: Sun Feb 14, 2021 10:31 am
 
Re: Chaning VPN client IP range on Ubuntu
Yes, VirtualHostIp is incorrect. Works for me...
on a Win client I get
Also the client may need to: ipconfig /renew *VPN*
			
									
									
						Code: Select all
                                declare VirtualDhcpServer
                                {
                                        string DhcpDnsServerAddress 10.8.0.1
                                        string DhcpDnsServerAddress2 0.0.0.0
                                        string DhcpDomainName $
                                        bool DhcpEnabled true
                                        uint DhcpExpireTimeSpan 7200
                                        string DhcpGatewayAddress 10.8.0.1
                                        string DhcpLeaseIPEnd 10.8.0.200
                                        string DhcpLeaseIPStart 10.8.0.10
                                        string DhcpPushRoutes $
                                        string DhcpSubnetMask 255.255.255.0
                                }
                                declare VirtualHost
                                {
                                        string VirtualHostIp 10.8.0.1
                                        string VirtualHostIpSubnetMask 255.255.255.0
Code: Select all
netstat -r
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0         10.8.0.1       10.8.0.10       1
          0.0.0.0          0.0.0.0      192.168.8.1   192.168.8.101       20
         10.8.0.0    255.255.255.0        10.8.0.10       10.8.0.10       1
        10.8.0.10  255.255.255.255        127.0.0.1       127.0.0.1       1
   10.255.255.255  255.255.255.255        10.8.0.10       10.8.0.10       1
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
     130.158.6.69  255.255.255.255      192.168.8.1   192.168.8.101       20
      192.168.8.0    255.255.255.0    192.168.8.101   192.168.8.101       20
    192.168.8.101  255.255.255.255        127.0.0.1       127.0.0.1       20
    192.168.8.255  255.255.255.255    192.168.8.101   192.168.8.101       20
        224.0.0.0        240.0.0.0        10.8.0.10       10.8.0.10       1
        224.0.0.0        240.0.0.0    192.168.8.101   192.168.8.101       20
  255.255.255.255  255.255.255.255        10.8.0.10               3       1
  255.255.255.255  255.255.255.255        10.8.0.10           10007       1
  255.255.255.255  255.255.255.255        10.8.0.10           10006       1
  255.255.255.255  255.255.255.255        10.8.0.10       10.8.0.10       1
  255.255.255.255  255.255.255.255    192.168.8.101   192.168.8.101       1
Default Gateway:          10.8.0.1
- 
				wahabqurashi
 - Posts: 10
 - Joined: Sat Apr 16, 2022 2:50 am
 
Re: Chaning VPN client IP range on Ubuntu
It is resolved now. Thanks for your help.
			
									
									
						