Page 1 of 1

Autoconfigure IP on SoftEther server Linux tap device

Posted: Sun Oct 04, 2015 8:08 am
by oxwivi
How may I configure DHCP autoconfiguration or at least a static IP on SoftEther's tap device whenever it's up (after something like service or server restart)?

Re: Autoconfigure IP on SoftEther server Linux tap device

Posted: Sun Oct 04, 2015 4:53 pm
by qupfer
you just need follow your linux distribution manual. I mean how should anybody help, if you nearly tell nothinh -.-

I have a "double bridge" ("softether" bridged to "tap" and tap bridged to "eth0") and running debian jessie (any other systemd enabled linux should work in a similar way)


qupfer@rpi7 /etc/systemd/network $ tail -n +1 /etc/systemd/network/*
==> /etc/systemd/network/br0.netdev <==
[NetDev]
Name=br0
Kind=bridge

==> /etc/systemd/network/br0.network <==
[Match]
Name=br0

[Network]
Address=10.10.10.100/16
Gateway=10.10.10.10
DNS=10.10.10.10


==> /etc/systemd/network/eth0.network <==
[Match]
Name=eth0

[Network]
Bridge=br0

==> /etc/systemd/network/tap.network <==
[Match]
Name=tap_soft

[Network]
Bridge=br0



and then, enable it with:
"systemctl enable systemd-networkd.service" (and make sure, all other "network-config" tools like networkmanager, wicd etc. are removed or disabled or have lot of fun with unexpected behaviors :-)

Re: Autoconfigure IP on SoftEther server Linux tap device

Posted: Mon Oct 05, 2015 1:31 pm
by oxwivi
I considered doing so, but felt it too redundant. Essentially, the tap device is there for the exclusive purpose of providing an VPN IP to the server. The server doesn't need to bridge to any physical network it is connecting to...

Re: Autoconfigure IP on SoftEther server Linux tap device

Posted: Mon Oct 05, 2015 4:21 pm
by qupfer
if just access to the vpn-server itsel is needed, I think this sould be enough:

==> /etc/systemd/network/eth0.network <==
[Match]
Name=eth0

[Network]
DHCP=yes

==> /etc/systemd/network/tap.network <==
[Match]
Name=tap_soft

[Network]
Address=10.10.10.100/16
Gateway=10.10.10.10
DNS=10.10.10.10



If configured, networkd should set the device "tap_soft" to defined IP. If you are running a dns on vpn-server, you can set tap_soft to dhcp too. Please take also a look to this tutorial:
http://blog.lincoln.hk/blog/2013/05/17/ ... al-bridge/

There is a init-script to start softether and configure the tap_device.

Re: Autoconfigure IP on SoftEther server Linux tap device

Posted: Tue Oct 06, 2015 6:05 am
by oxwivi
I don't have networkd, or even systemd for that matter. It's a CentOS 7. If you've any ifcfg config to do the same there, please share! None of my attempts worked...

Re: Autoconfigure IP on SoftEther server Linux tap device

Posted: Wed Oct 07, 2015 2:25 pm
by oxwivi
I've created my own tap device (separate from SoftEther) on CentOS 7:
DEVICE=tap0
TYPE=Tap
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.0.100
NETMASK=255.255.255.0

$ ifconfig tap0
tap0 Link encap:Ethernet HWaddr 1A:B1:11:2F:68:6D
inet addr:192.168.0.100 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::18b1:11ff:fe2f:686d/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:2222 overruns:0 carrier:0
collisions:0 txqueuelen:500
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

I bridged it using VPN Server Manager on Windows, and it shows it's operating. But neither it's MAC nor it's IP shows up on the SoftEther bridge's IP and MAC tables respectively.

Re: Autoconfigure IP on SoftEther server Linux tap device

Posted: Thu Oct 08, 2015 12:37 am
by theodisbutler
Don't create your own tap device using OS commands. Let Soft Ether do it for you.

Re: Autoconfigure IP on SoftEther server Linux tap device

Posted: Thu Oct 08, 2015 5:04 am
by oxwivi
theodisbutler wrote:
> Don't create your own tap device using OS commands. Let Soft Ether do it
> for you.

Why not? I can't autoconfigure the one SoftEther creates either. What the hell am I supposed to do?

Re: Autoconfigure IP on SoftEther server Linux tap device

Posted: Thu Oct 08, 2015 1:28 pm
by oxwivi
I finally got ifcfg-tap_vps0 to work:

DEVICE=tap_vps0
TYPE=Tap
BOOTPROTO=static
IPADDR=192.168.0.100
NETMASK=255.255.255.0