Ubuntu 17.10 - OpenVPN TAP - Help
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
I am desperate at this point. I have been trying to configure a bridge networking on Ubuntu 17.10 and it has been hell. I canâÂÂt find any documents online to assist with install. All of the ones I have found are written for 16.04 and below. Can someone please help me. With this Net plan implementation instead of interfaces everything seems to be a headache. Below are my configurations.
Info:
router: 10.0.1.1
ip address 10.0.1.100
network 10.0.1.0
gateway 10.0.1.1
dns: 10.0.1.1
netmask 255.255.255.0
admin@SKYNET:~$ cat /etc/netplan/01-netcfg.yaml
This file describes the network interfaces available on your system
For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s31f6:
dhcp4: yes
bridges:
br0:
interfaces: [enp0s31f6]
dhcp4: true
optional: true
admin@SKYNET:~$ cat /etc/openvpn/server.conf
port 1194
proto udp
dev tap
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
ifconfig-pool-persist ipp.txt
server-bridge 10.0.1.100 255.255.255.0 10.0.1.230 10.0.1.254
push "route 10.0.1.0 255.255.255.0 10.0.1.1"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 10.0.1.1"
client-to-client
keepalive 10 120
tls-auth ta.key 0
cipher AES-256-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1
admin@SKYNET:~$ cat /etc/openvpn/easy-rsa/keys/client.ovpn
client
dev tap
proto udp
remote 1194
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-CBC
comp-lzo
verb 3
I followed the steps from this page on the Ubuntu help wiki but the Prepare interface config for bridging on server step doesnâÂÂt seem to work since interfaces isn't there any more. Not sure how to bring tap0
up/down. I seem to be having a routing issue when the clients connect.
[admin@SKYNET:~$ ifconfig br0
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.1.100 netmask 255.255.255.0 broadcast 10.0.1.255
inet6 fe80::c96:daff:feda:65b8 prefixlen 64 scopeid 0x20
ether 0e:96:da:da:65:b8 txqueuelen 1000 (Ethernet)
RX packets 1327461 bytes 2776343355 (2.7 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 953269 bytes 1907343180 (1.9 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[admin@SKYNET:~$ ifconfig tap0
tap0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 0a:82:dd:10:85:4d txqueuelen 100 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Also I added the firewall rules
iptables -A INPUT -i tap0 -j ACCEPT
iptables -A INPUT -i br0 -j ACCEPT
iptables -A FORWARD -i br0 -j ACCEPT
What am I doing wrong?
networking vpn openvpn network-bridge netplan
add a comment |Â
up vote
0
down vote
favorite
I am desperate at this point. I have been trying to configure a bridge networking on Ubuntu 17.10 and it has been hell. I canâÂÂt find any documents online to assist with install. All of the ones I have found are written for 16.04 and below. Can someone please help me. With this Net plan implementation instead of interfaces everything seems to be a headache. Below are my configurations.
Info:
router: 10.0.1.1
ip address 10.0.1.100
network 10.0.1.0
gateway 10.0.1.1
dns: 10.0.1.1
netmask 255.255.255.0
admin@SKYNET:~$ cat /etc/netplan/01-netcfg.yaml
This file describes the network interfaces available on your system
For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s31f6:
dhcp4: yes
bridges:
br0:
interfaces: [enp0s31f6]
dhcp4: true
optional: true
admin@SKYNET:~$ cat /etc/openvpn/server.conf
port 1194
proto udp
dev tap
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
ifconfig-pool-persist ipp.txt
server-bridge 10.0.1.100 255.255.255.0 10.0.1.230 10.0.1.254
push "route 10.0.1.0 255.255.255.0 10.0.1.1"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 10.0.1.1"
client-to-client
keepalive 10 120
tls-auth ta.key 0
cipher AES-256-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1
admin@SKYNET:~$ cat /etc/openvpn/easy-rsa/keys/client.ovpn
client
dev tap
proto udp
remote 1194
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-CBC
comp-lzo
verb 3
I followed the steps from this page on the Ubuntu help wiki but the Prepare interface config for bridging on server step doesnâÂÂt seem to work since interfaces isn't there any more. Not sure how to bring tap0
up/down. I seem to be having a routing issue when the clients connect.
[admin@SKYNET:~$ ifconfig br0
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.1.100 netmask 255.255.255.0 broadcast 10.0.1.255
inet6 fe80::c96:daff:feda:65b8 prefixlen 64 scopeid 0x20
ether 0e:96:da:da:65:b8 txqueuelen 1000 (Ethernet)
RX packets 1327461 bytes 2776343355 (2.7 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 953269 bytes 1907343180 (1.9 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[admin@SKYNET:~$ ifconfig tap0
tap0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 0a:82:dd:10:85:4d txqueuelen 100 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Also I added the firewall rules
iptables -A INPUT -i tap0 -j ACCEPT
iptables -A INPUT -i br0 -j ACCEPT
iptables -A FORWARD -i br0 -j ACCEPT
What am I doing wrong?
networking vpn openvpn network-bridge netplan
Please check the indentation on your /etc/netplan file. This is a structured yaml file but in your post everything is left-aligned which makes it invalid. I also notice you are enabling DHCP on both the physical interface and on the bridge. This is probably not what you want, you probably want to enable DHCP only on the bridge and disable it on the physical interface. But this is probably not the cause of your problem. With your configuration, what is the output of 'ifconfig'? Do you see the interfaces and addresses that you expect?
â slangasek
May 17 at 22:51
The indentation is wrong because I copy and paste from another site I posted this on. In regards to the dhcp for the physical interface, do you mind showing me an example how the netplan file suppose to look like. Thanks.
â nickyung
May 18 at 2:31
I think what i really need with is the proper netplan yaml setting, the up/down script and the syntax to use to call the scripts in the server.config file. Again, any help is much appreciated.
â nickyung
May 18 at 2:48
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am desperate at this point. I have been trying to configure a bridge networking on Ubuntu 17.10 and it has been hell. I canâÂÂt find any documents online to assist with install. All of the ones I have found are written for 16.04 and below. Can someone please help me. With this Net plan implementation instead of interfaces everything seems to be a headache. Below are my configurations.
Info:
router: 10.0.1.1
ip address 10.0.1.100
network 10.0.1.0
gateway 10.0.1.1
dns: 10.0.1.1
netmask 255.255.255.0
admin@SKYNET:~$ cat /etc/netplan/01-netcfg.yaml
This file describes the network interfaces available on your system
For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s31f6:
dhcp4: yes
bridges:
br0:
interfaces: [enp0s31f6]
dhcp4: true
optional: true
admin@SKYNET:~$ cat /etc/openvpn/server.conf
port 1194
proto udp
dev tap
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
ifconfig-pool-persist ipp.txt
server-bridge 10.0.1.100 255.255.255.0 10.0.1.230 10.0.1.254
push "route 10.0.1.0 255.255.255.0 10.0.1.1"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 10.0.1.1"
client-to-client
keepalive 10 120
tls-auth ta.key 0
cipher AES-256-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1
admin@SKYNET:~$ cat /etc/openvpn/easy-rsa/keys/client.ovpn
client
dev tap
proto udp
remote 1194
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-CBC
comp-lzo
verb 3
I followed the steps from this page on the Ubuntu help wiki but the Prepare interface config for bridging on server step doesnâÂÂt seem to work since interfaces isn't there any more. Not sure how to bring tap0
up/down. I seem to be having a routing issue when the clients connect.
[admin@SKYNET:~$ ifconfig br0
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.1.100 netmask 255.255.255.0 broadcast 10.0.1.255
inet6 fe80::c96:daff:feda:65b8 prefixlen 64 scopeid 0x20
ether 0e:96:da:da:65:b8 txqueuelen 1000 (Ethernet)
RX packets 1327461 bytes 2776343355 (2.7 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 953269 bytes 1907343180 (1.9 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[admin@SKYNET:~$ ifconfig tap0
tap0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 0a:82:dd:10:85:4d txqueuelen 100 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Also I added the firewall rules
iptables -A INPUT -i tap0 -j ACCEPT
iptables -A INPUT -i br0 -j ACCEPT
iptables -A FORWARD -i br0 -j ACCEPT
What am I doing wrong?
networking vpn openvpn network-bridge netplan
I am desperate at this point. I have been trying to configure a bridge networking on Ubuntu 17.10 and it has been hell. I canâÂÂt find any documents online to assist with install. All of the ones I have found are written for 16.04 and below. Can someone please help me. With this Net plan implementation instead of interfaces everything seems to be a headache. Below are my configurations.
Info:
router: 10.0.1.1
ip address 10.0.1.100
network 10.0.1.0
gateway 10.0.1.1
dns: 10.0.1.1
netmask 255.255.255.0
admin@SKYNET:~$ cat /etc/netplan/01-netcfg.yaml
This file describes the network interfaces available on your system
For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s31f6:
dhcp4: yes
bridges:
br0:
interfaces: [enp0s31f6]
dhcp4: true
optional: true
admin@SKYNET:~$ cat /etc/openvpn/server.conf
port 1194
proto udp
dev tap
ca ca.crt
cert server.crt
key server.key
dh dh2048.pem
ifconfig-pool-persist ipp.txt
server-bridge 10.0.1.100 255.255.255.0 10.0.1.230 10.0.1.254
push "route 10.0.1.0 255.255.255.0 10.0.1.1"
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 10.0.1.1"
client-to-client
keepalive 10 120
tls-auth ta.key 0
cipher AES-256-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
explicit-exit-notify 1
admin@SKYNET:~$ cat /etc/openvpn/easy-rsa/keys/client.ovpn
client
dev tap
proto udp
remote 1194
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
remote-cert-tls server
tls-auth ta.key 1
cipher AES-256-CBC
comp-lzo
verb 3
I followed the steps from this page on the Ubuntu help wiki but the Prepare interface config for bridging on server step doesnâÂÂt seem to work since interfaces isn't there any more. Not sure how to bring tap0
up/down. I seem to be having a routing issue when the clients connect.
[admin@SKYNET:~$ ifconfig br0
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.1.100 netmask 255.255.255.0 broadcast 10.0.1.255
inet6 fe80::c96:daff:feda:65b8 prefixlen 64 scopeid 0x20
ether 0e:96:da:da:65:b8 txqueuelen 1000 (Ethernet)
RX packets 1327461 bytes 2776343355 (2.7 GB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 953269 bytes 1907343180 (1.9 GB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[admin@SKYNET:~$ ifconfig tap0
tap0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 0a:82:dd:10:85:4d txqueuelen 100 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Also I added the firewall rules
iptables -A INPUT -i tap0 -j ACCEPT
iptables -A INPUT -i br0 -j ACCEPT
iptables -A FORWARD -i br0 -j ACCEPT
What am I doing wrong?
networking vpn openvpn network-bridge netplan
edited May 17 at 7:52
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
Zanna
47.9k13117227
47.9k13117227
asked May 17 at 4:21
nickyung
31
31
Please check the indentation on your /etc/netplan file. This is a structured yaml file but in your post everything is left-aligned which makes it invalid. I also notice you are enabling DHCP on both the physical interface and on the bridge. This is probably not what you want, you probably want to enable DHCP only on the bridge and disable it on the physical interface. But this is probably not the cause of your problem. With your configuration, what is the output of 'ifconfig'? Do you see the interfaces and addresses that you expect?
â slangasek
May 17 at 22:51
The indentation is wrong because I copy and paste from another site I posted this on. In regards to the dhcp for the physical interface, do you mind showing me an example how the netplan file suppose to look like. Thanks.
â nickyung
May 18 at 2:31
I think what i really need with is the proper netplan yaml setting, the up/down script and the syntax to use to call the scripts in the server.config file. Again, any help is much appreciated.
â nickyung
May 18 at 2:48
add a comment |Â
Please check the indentation on your /etc/netplan file. This is a structured yaml file but in your post everything is left-aligned which makes it invalid. I also notice you are enabling DHCP on both the physical interface and on the bridge. This is probably not what you want, you probably want to enable DHCP only on the bridge and disable it on the physical interface. But this is probably not the cause of your problem. With your configuration, what is the output of 'ifconfig'? Do you see the interfaces and addresses that you expect?
â slangasek
May 17 at 22:51
The indentation is wrong because I copy and paste from another site I posted this on. In regards to the dhcp for the physical interface, do you mind showing me an example how the netplan file suppose to look like. Thanks.
â nickyung
May 18 at 2:31
I think what i really need with is the proper netplan yaml setting, the up/down script and the syntax to use to call the scripts in the server.config file. Again, any help is much appreciated.
â nickyung
May 18 at 2:48
Please check the indentation on your /etc/netplan file. This is a structured yaml file but in your post everything is left-aligned which makes it invalid. I also notice you are enabling DHCP on both the physical interface and on the bridge. This is probably not what you want, you probably want to enable DHCP only on the bridge and disable it on the physical interface. But this is probably not the cause of your problem. With your configuration, what is the output of 'ifconfig'? Do you see the interfaces and addresses that you expect?
â slangasek
May 17 at 22:51
Please check the indentation on your /etc/netplan file. This is a structured yaml file but in your post everything is left-aligned which makes it invalid. I also notice you are enabling DHCP on both the physical interface and on the bridge. This is probably not what you want, you probably want to enable DHCP only on the bridge and disable it on the physical interface. But this is probably not the cause of your problem. With your configuration, what is the output of 'ifconfig'? Do you see the interfaces and addresses that you expect?
â slangasek
May 17 at 22:51
The indentation is wrong because I copy and paste from another site I posted this on. In regards to the dhcp for the physical interface, do you mind showing me an example how the netplan file suppose to look like. Thanks.
â nickyung
May 18 at 2:31
The indentation is wrong because I copy and paste from another site I posted this on. In regards to the dhcp for the physical interface, do you mind showing me an example how the netplan file suppose to look like. Thanks.
â nickyung
May 18 at 2:31
I think what i really need with is the proper netplan yaml setting, the up/down script and the syntax to use to call the scripts in the server.config file. Again, any help is much appreciated.
â nickyung
May 18 at 2:48
I think what i really need with is the proper netplan yaml setting, the up/down script and the syntax to use to call the scripts in the server.config file. Again, any help is much appreciated.
â nickyung
May 18 at 2:48
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
You don't want to configure addresses on both the bridge and the physical interface, which is what happens when you have dhcp4: true set in both places. To match the configuration described in https://help.ubuntu.com/lts/serverguide/openvpn.html.en#openvpn-advanced-config, your netplan yaml should look like:
$ cat /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s31f6:
dhcp4: no
bridges:
br0:
interfaces: [enp0s31f6]
dhcp4: no
addresses: [10.0.1.100/24]
gateway4: 10.0.1.1
nameservers:
addresses: [10.0.1.1]
Note that this uses static address configuration. DHCP also works, but it does not make sense to have other config files on your system (the openvpn.conf) with statically configured IP information, but use DHCP for the host's network.
You do not need to declare this interface "optional", which only relates to what other systemd units will wait for this interface to be configured at boot.
The other portion of the ifupdown config that does not translate to netplan is the 'promisc' command: up ip link set $IFACE up promisc on
. To do the equivalent on a system using netplan, ensure that you have the networkd-dispatcher
package installed, then install the following script as /usr/lib/networkd-dispatcher/dormant.d/promisc_bridge
(owned by root, marked executable):
#!/bin/sh
set -e
if [ "$IFACE" = br0 ]; then
# no networkd-dispatcher event for 'carrier' on the physical interface
ip link set eth0 up promisc on
fi
Thanks for the help. I will try it in a test environment. I ended up installing ifupdown and resolvconf and disable the netplan and the installed version of resolvconf. Steps I took are listed documented in this post forums.openvpn.net/â¦
â nickyung
May 21 at 16:43
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
You don't want to configure addresses on both the bridge and the physical interface, which is what happens when you have dhcp4: true set in both places. To match the configuration described in https://help.ubuntu.com/lts/serverguide/openvpn.html.en#openvpn-advanced-config, your netplan yaml should look like:
$ cat /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s31f6:
dhcp4: no
bridges:
br0:
interfaces: [enp0s31f6]
dhcp4: no
addresses: [10.0.1.100/24]
gateway4: 10.0.1.1
nameservers:
addresses: [10.0.1.1]
Note that this uses static address configuration. DHCP also works, but it does not make sense to have other config files on your system (the openvpn.conf) with statically configured IP information, but use DHCP for the host's network.
You do not need to declare this interface "optional", which only relates to what other systemd units will wait for this interface to be configured at boot.
The other portion of the ifupdown config that does not translate to netplan is the 'promisc' command: up ip link set $IFACE up promisc on
. To do the equivalent on a system using netplan, ensure that you have the networkd-dispatcher
package installed, then install the following script as /usr/lib/networkd-dispatcher/dormant.d/promisc_bridge
(owned by root, marked executable):
#!/bin/sh
set -e
if [ "$IFACE" = br0 ]; then
# no networkd-dispatcher event for 'carrier' on the physical interface
ip link set eth0 up promisc on
fi
Thanks for the help. I will try it in a test environment. I ended up installing ifupdown and resolvconf and disable the netplan and the installed version of resolvconf. Steps I took are listed documented in this post forums.openvpn.net/â¦
â nickyung
May 21 at 16:43
add a comment |Â
up vote
0
down vote
accepted
You don't want to configure addresses on both the bridge and the physical interface, which is what happens when you have dhcp4: true set in both places. To match the configuration described in https://help.ubuntu.com/lts/serverguide/openvpn.html.en#openvpn-advanced-config, your netplan yaml should look like:
$ cat /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s31f6:
dhcp4: no
bridges:
br0:
interfaces: [enp0s31f6]
dhcp4: no
addresses: [10.0.1.100/24]
gateway4: 10.0.1.1
nameservers:
addresses: [10.0.1.1]
Note that this uses static address configuration. DHCP also works, but it does not make sense to have other config files on your system (the openvpn.conf) with statically configured IP information, but use DHCP for the host's network.
You do not need to declare this interface "optional", which only relates to what other systemd units will wait for this interface to be configured at boot.
The other portion of the ifupdown config that does not translate to netplan is the 'promisc' command: up ip link set $IFACE up promisc on
. To do the equivalent on a system using netplan, ensure that you have the networkd-dispatcher
package installed, then install the following script as /usr/lib/networkd-dispatcher/dormant.d/promisc_bridge
(owned by root, marked executable):
#!/bin/sh
set -e
if [ "$IFACE" = br0 ]; then
# no networkd-dispatcher event for 'carrier' on the physical interface
ip link set eth0 up promisc on
fi
Thanks for the help. I will try it in a test environment. I ended up installing ifupdown and resolvconf and disable the netplan and the installed version of resolvconf. Steps I took are listed documented in this post forums.openvpn.net/â¦
â nickyung
May 21 at 16:43
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
You don't want to configure addresses on both the bridge and the physical interface, which is what happens when you have dhcp4: true set in both places. To match the configuration described in https://help.ubuntu.com/lts/serverguide/openvpn.html.en#openvpn-advanced-config, your netplan yaml should look like:
$ cat /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s31f6:
dhcp4: no
bridges:
br0:
interfaces: [enp0s31f6]
dhcp4: no
addresses: [10.0.1.100/24]
gateway4: 10.0.1.1
nameservers:
addresses: [10.0.1.1]
Note that this uses static address configuration. DHCP also works, but it does not make sense to have other config files on your system (the openvpn.conf) with statically configured IP information, but use DHCP for the host's network.
You do not need to declare this interface "optional", which only relates to what other systemd units will wait for this interface to be configured at boot.
The other portion of the ifupdown config that does not translate to netplan is the 'promisc' command: up ip link set $IFACE up promisc on
. To do the equivalent on a system using netplan, ensure that you have the networkd-dispatcher
package installed, then install the following script as /usr/lib/networkd-dispatcher/dormant.d/promisc_bridge
(owned by root, marked executable):
#!/bin/sh
set -e
if [ "$IFACE" = br0 ]; then
# no networkd-dispatcher event for 'carrier' on the physical interface
ip link set eth0 up promisc on
fi
You don't want to configure addresses on both the bridge and the physical interface, which is what happens when you have dhcp4: true set in both places. To match the configuration described in https://help.ubuntu.com/lts/serverguide/openvpn.html.en#openvpn-advanced-config, your netplan yaml should look like:
$ cat /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
enp0s31f6:
dhcp4: no
bridges:
br0:
interfaces: [enp0s31f6]
dhcp4: no
addresses: [10.0.1.100/24]
gateway4: 10.0.1.1
nameservers:
addresses: [10.0.1.1]
Note that this uses static address configuration. DHCP also works, but it does not make sense to have other config files on your system (the openvpn.conf) with statically configured IP information, but use DHCP for the host's network.
You do not need to declare this interface "optional", which only relates to what other systemd units will wait for this interface to be configured at boot.
The other portion of the ifupdown config that does not translate to netplan is the 'promisc' command: up ip link set $IFACE up promisc on
. To do the equivalent on a system using netplan, ensure that you have the networkd-dispatcher
package installed, then install the following script as /usr/lib/networkd-dispatcher/dormant.d/promisc_bridge
(owned by root, marked executable):
#!/bin/sh
set -e
if [ "$IFACE" = br0 ]; then
# no networkd-dispatcher event for 'carrier' on the physical interface
ip link set eth0 up promisc on
fi
edited Jul 17 at 2:10
answered May 19 at 4:33
slangasek
2,27811318
2,27811318
Thanks for the help. I will try it in a test environment. I ended up installing ifupdown and resolvconf and disable the netplan and the installed version of resolvconf. Steps I took are listed documented in this post forums.openvpn.net/â¦
â nickyung
May 21 at 16:43
add a comment |Â
Thanks for the help. I will try it in a test environment. I ended up installing ifupdown and resolvconf and disable the netplan and the installed version of resolvconf. Steps I took are listed documented in this post forums.openvpn.net/â¦
â nickyung
May 21 at 16:43
Thanks for the help. I will try it in a test environment. I ended up installing ifupdown and resolvconf and disable the netplan and the installed version of resolvconf. Steps I took are listed documented in this post forums.openvpn.net/â¦
â nickyung
May 21 at 16:43
Thanks for the help. I will try it in a test environment. I ended up installing ifupdown and resolvconf and disable the netplan and the installed version of resolvconf. Steps I took are listed documented in this post forums.openvpn.net/â¦
â nickyung
May 21 at 16:43
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1037223%2fubuntu-17-10-openvpn-tap-help%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Please check the indentation on your /etc/netplan file. This is a structured yaml file but in your post everything is left-aligned which makes it invalid. I also notice you are enabling DHCP on both the physical interface and on the bridge. This is probably not what you want, you probably want to enable DHCP only on the bridge and disable it on the physical interface. But this is probably not the cause of your problem. With your configuration, what is the output of 'ifconfig'? Do you see the interfaces and addresses that you expect?
â slangasek
May 17 at 22:51
The indentation is wrong because I copy and paste from another site I posted this on. In regards to the dhcp for the physical interface, do you mind showing me an example how the netplan file suppose to look like. Thanks.
â nickyung
May 18 at 2:31
I think what i really need with is the proper netplan yaml setting, the up/down script and the syntax to use to call the scripts in the server.config file. Again, any help is much appreciated.
â nickyung
May 18 at 2:48