14

Running Ubuntu Server 19.04. Using SoftEther's Local Bridge feature. Their docs recommend disabling IP on the interface used for bridging.

Here's my Netplan configuration:

network:
  version: 2
  renderer: networkd
  ethernets:
    lan:
      match:
        macaddress: c8:2a:14:00:00:00
      addresses:
      - 192.168.1.253/24
      dhcp4: false
      gateway4: 192.168.1.254
      nameservers:
        addresses:
        - 192.168.1.254
      set-name: lan
    softether:
      match:
        macaddress: a8:60:b6:00:00:00
      dhcp4: false
      optional: true
      set-name: softether
    wifi:
      match:
        macaddress: 40:6c:8f:00:00:00
      dhcp4: true
      optional: true
      set-name: wifi

Still getting an IPv6 on the softether interface:

$ ip a
2: softether: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether a8:60:b6:00:00:00 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::aa60:b6ff:fe09:937c/64 scope link 
       valid_lft forever preferred_lft forever

Is there a way to remove IPv6 using Netplan alone?

muru
  • 207,228

3 Answers3

17

This question is a bit old, however there is a way to do it with netplan, using this answer to a similar question:

Just add link-local: [] within the interface you want to disable the ipv6 link local address option. Save and test the new config with: sudo netplan try and if everything was okay enforce it with: sudo netplan apply.

This did exactly what I wanted - disabling ipv6 on just one of the two NICs in the server.

NOTE: As Raptor points out, this will also disable link-local adresses for IPv4 as well, so if you need that then you will need to use a different solution.

16

FYI:

link-local: [ ipv4 ]

helps keeping ipv4 up while disabling ipv6. Cheers

Ben E-10
  • 161
1

Have you tried

iface=softether
sudo sysctl -w net.ipv6.conf.$iface.disable_ipv6=1
SebMa
  • 2,927
  • 5
  • 35
  • 47