Page 1 of 1

No IP Address being Assigned: Linux

Posted: Sun Jun 08, 2014 4:09 pm
by Stealthbird97
Hi,

I have a SoftEther VPN Server running on my windows machine. Works great when connecting with a windows computer and the VPN Client with GUI. IP address is assigned and all network is routed through the VPN.

When I try to get my Linux (Ubuntu 14.04LTS x64) system to do the same, it does not.
Using the VPN Client (vpnclient) and (vpncmd), I think I have it all setup. When I do the accountconnect command, it works and accountstatusget shows that the vpn connection is working. The thing is for some reason it does not get given a IP address from my SecureNAT DHCP server like the windows machine does.

As a result, there is effectively no network connection and no traffic gets routed through it.
Any ideas on what is the issue here.

Sorry, I'm new to this so please excuse any stupid questions.

Info:
OS: Ubuntu 14.04LTS
SoftEther Build: 9449

Re: No IP Address being Assigned: Linux

Posted: Sun Jun 08, 2014 4:50 pm
by dnobori
On Windows system, the DHCP client service will automatically request and assign a new IP address for a virtual network adapter of VPN Client, from a DHCP server.

Unlike Windows, on Linux system you need to use your perferred DHCP client software to obtain an IP address after the VPN session has been made.

Re: No IP Address being Assigned: Linux

Posted: Sun Jun 08, 2014 5:45 pm
by Stealthbird97
Right,

It also appears that the virtual network adapter only has an ipv6 address so when I do a dhcp request it won't get an ipv4 address. Is this a setting or something?

Re: No IP Address being Assigned: Linux

Posted: Mon Jun 09, 2014 5:03 pm
by Stealthbird97
So for some reason there is no IPv4, only IPv6.
I can't get an IPv4 address via DHCP if there is no IPv4 for it to assign to.

Anyone know about that?

Re: No IP Address being Assigned: Linux

Posted: Wed Jun 11, 2014 6:16 am
by rollingscissors
I noticed that too, and not sure if turning off IPv6 would help.

Re: No IP Address being Assigned: Linux

Posted: Mon Jul 07, 2014 6:36 am
by shango
Has anyone figured this out yet? I'm having the same problem.

Re: No IP Address being Assigned: Linux

Posted: Thu Jul 24, 2014 8:21 pm
by wanggao
> I noticed that too, and not sure if turning off IPv6 would help.
No it will not

To auto assign and IP, as dnobori pointed out, a dhcp client is needed. For example:

sudo dhclient <vpn_adapter>

where <vpn_adapter> is name of adapter you created and used for connection.

Re: No IP Address being Assigned: Linux

Posted: Fri Sep 07, 2018 6:34 pm
by linuxgeek
Same issue with me, using CEntos7. Everything went fine during install. It is now connected to the server. However one question, how do we know the hostname of the client connected in the server, or what is the ip address assign by the server to the client? Is there a list of clients in the server that we can see it? I check the virtual card created in the linux client by using ifconfig, but there is no ip address assigned in the virtual nic. Below are the info that ifconfig showed:
vpn_vpn Link encap:Ethernet HWaddr 5E:38:71:3E:EC:39
inet6 addr: fe80::5c38:71ff:fe3e:ec39/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:333137 errors:0 dropped:0 overruns:0 frame:0
TX packets:43147 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:65682923 (62.6 MiB) TX bytes:3572538 (3.4 MiB)

Below the connection status:
VPN Client>AccountList
AccountList command - Get List of VPN Connection Settings
Item |Value
----------------------------+-----------------------------------------------
VPN Connection Setting Name |evovpn
Status |Connected
VPN Server Hostname |192.168.200.212:5555 (Direct TCP/IP Connection)
Virtual Hub |evo_vpn
Virtual Network Adapter Name|VPN
The command completed successfully.

Any help on this issue? I noticed it has been 4 years since this discussion has been updated. Anyone there could shed some light on how to fixed this issue? I tried the suggestion of dnobori, but to no avail. Please help. Thank you.

Re: No IP Address being Assigned: Linux

Posted: Fri Oct 05, 2018 5:53 pm
by cmd wh0ami
Forward IPv4 in sysctl
vi /etc/sysctl.conf

Code: Select all

net.ipv4.ip_forward=1
and load it
sysctl -p

Then I know your running CentOS 7... So you need to do something in /etc/sysconfig/network-scripts/-ifcfg-vpn_vpn...

For debian based you would.... vi /etc/network/interfaces And throw this in there.

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback

auto-hotplug vpn_vpn
iface vpn_vpn inet dhcp
Then your /etc/init.d/vpnclient would go like this...

Code: Select all

#! /bin/sh
###############################################
#  SOFTETHER CLIENT
###############################################
### BEGIN INIT INFO #############################
###############################################
# Provides: vpnclient
# Required-Start: $all
# Required-Stop: $network $local_fs $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start VPN Client at boot time
# chkconfig: 345 44 56
# description: Start VPN Client at boot time.
# processname: vpnclient
# 55.55.55.55 = VPN public IP
##########################
### END INIT INFO ##########
##########################

case "$1" in
 start)
 echo "Starting VPN Client"
 /usr/local/vpnclient/vpnclient start
sleep 1
if ifconfig -a | grep vpn_vpn >/dev/null
then 
     echo "Setting up vpn_vpn..."
else 
     echo "Interface vpn_vpn not found" &1>2

 ifdown vpn_vpn
sleep 1
 ifup vpn_vpn
sleep 1
     echo "Setting up vpn_vpn..."
 exit 1
fi

 route add -host 55.55.55.55 gw $(ip route list exact 0.0.0.0/0 | grep wlan0 | xargs | awk '{print $3}')
 # route del default
 # route add default gw 192.168.30.1 dev vpn_vpn

 /usr/local/vpnclient/./vpncmd
 ;;
 stop)
 echo "Stopping VPN Client"
 /usr/local/vpnclient/vpnclient stop
 route del -host 55.55.55.55

 #route del default
 route add default gw $(ip route list exact 0.0.0.0/0 | grep wlan0 | xargs | awk '{print $3}') dev wlan0
 ;;
 *)
 echo "Usage: /etc/init.d/vpnclient {start|stop}"
 exit 1
 ;;
esac
exit 0
I'm almost sure there's got to be a better way, but this is how I worked it out on my own.

Re: No IP Address being Assigned: Linux

Posted: Thu Oct 18, 2018 6:52 am
by thisjun
>linuxgeek

Is there DHCP server on the virtual hub segment?