-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature request] DHCP with OpenVPN in TAP mode #822
Comments
It's the intended behavior, because the operating system is supposed to be sending a DHCP request through the virtual network interface, which is what happens on Windows.
#!/bin/bash
case $script_type in
up)
echo "Requesting IP address for ${dev} from DHCP server..."
dhclient -v "${dev}"
;;
down)
echo "Releasing ${dev}'s DHCP lease..."
dhclient -r "${dev}"
;;
esac In OpenVPN's configuration:
|
Thanks for the quick reply! |
You're welcome! The OpenVPN server acts as a DHCP server when you set the network in its configuration, otherwise it doesn't send the IP address because it isn't a DHCP client. We can implement the feature in SoftEther VPN, with a client-side environment variable such as |
The client timing out turned out to be an OpenVPN bug, we implemented a workaround in #828. #827 implements the desired feature, however in Layer 2 mode the DHCP lease is supposed to be requested by the client and not by an intermediary entity (the VPN server). Do you still want the feature, now that the timeout issue is not present anymore? |
Alright, that totally understandable. I'll make a patch from your implementation for my own projects. |
No problem. |
Prerequisites
SoftEther version: Build from master 3842e81
Component: Server
Operating system: Ubuntu 18.04 server
Architecture: 64 bit
Description
I'm using SoftEtherVPN server as an Openvpn server. Connection with an layer 3 (tun) config works fine, but when I connect with an layer 2 (tap) config I won't get an ip address.
The server has dhcp enabled as made clear by the ip that gets leased by connection to the server with an tun config.
Expected behavior:
Get an ip lease with a tap config.
Actual behavior:
I don't get an ip.
Some relevant logs
When connecting with tun I do get an ifconfig push, but not with tap.
Log from tun config:
Wed Nov 28 12:11:08 2018 PUSH: Received control message: 'PUSH_REPLY,ping 3,ping-restart 10,topology subnet,ifconfig 192.168.30.10 255.255.255.0,dhcp-option DNS 192.168.30.1,route-gateway 192.168.30.1,redirect-gateway def1'
Log from tap config:
Wed Nov 28 11:43:56 2018 PUSH: Received control message: 'PUSH_REPLY,ping 3,ping-restart 10'
The text was updated successfully, but these errors were encountered: