11

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?

3 Answers 3

13

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.

2
  • 1
    this will disable link-local addresses on both IPv4 and IPv6.
    – Raptor
    Commented Jul 30, 2021 at 6:15
  • 1
    Ah, didn't catch that! I've updated my answer to include a warning about the scope of this solution. Commented Aug 2, 2021 at 17:45
10

FYI:

link-local: [ ipv4 ]

helps keeping ipv4 up while disabling ipv6. Cheers

2
  • It would be nice if there were a way for us to merge our answers. :) Commented Aug 30, 2022 at 18:06
  • this works nicely!
    – finnan
    Commented Nov 7, 2022 at 14:50
1

Have you tried

sysctl -w net.ipv6.conf.softether.disable_ipv6=1
2
  • Thanks - yep, saw that approach. Was curious if there was a way to do it via Netplan alone but seems not to be the case. Commented May 27, 2019 at 13:49
  • If you take out the space before and after the "=" in your response, I'll mark your answer as correct. Commented May 27, 2019 at 14:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .