Autoconfigure IP on SoftEther server Linux tap device
-
- Posts: 17
- Joined: Fri Sep 18, 2015 5:34 pm
Autoconfigure IP on SoftEther server Linux tap device
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)?
-
- Posts: 202
- Joined: Wed Jul 10, 2013 2:07 pm
Re: Autoconfigure IP on SoftEther server Linux tap device
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 :-)
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 :-)
-
- Posts: 17
- Joined: Fri Sep 18, 2015 5:34 pm
Re: Autoconfigure IP on SoftEther server Linux tap device
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...
-
- Posts: 202
- Joined: Wed Jul 10, 2013 2:07 pm
Re: Autoconfigure IP on SoftEther server Linux tap device
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.
==> /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.
-
- Posts: 17
- Joined: Fri Sep 18, 2015 5:34 pm
Re: Autoconfigure IP on SoftEther server Linux tap device
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...
-
- Posts: 17
- Joined: Fri Sep 18, 2015 5:34 pm
Re: Autoconfigure IP on SoftEther server Linux tap device
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.
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.
-
- Posts: 31
- Joined: Mon Feb 24, 2014 12:12 am
Re: Autoconfigure IP on SoftEther server Linux tap device
Don't create your own tap device using OS commands. Let Soft Ether do it for you.
-
- Posts: 17
- Joined: Fri Sep 18, 2015 5:34 pm
Re: Autoconfigure IP on SoftEther server Linux tap device
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?
> 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?
-
- Posts: 17
- Joined: Fri Sep 18, 2015 5:34 pm
Re: Autoconfigure IP on SoftEther server Linux tap device
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
DEVICE=tap_vps0
TYPE=Tap
BOOTPROTO=static
IPADDR=192.168.0.100
NETMASK=255.255.255.0