:: [DNG] How to remove the IP address …
Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Mario Marietto
Ημερομηνία:  
Προς: Mario Marietto via Dng
Αντικείμενο: [DNG] How to remove the IP address assigned to tap0 creating an udev rule
Hello to everyone.


I would like to remove the IP address (169.254.149.209) that's assigned to
tap0 on Linux host os (Devuan 5) at a certain point of the booting process
of FreeBSD (the guest os / vm),creating an udev rule like this :


/etc/udev/rules.d/01-flush-tap0.rules:

KERNEL=="tap0", ACTION=="add", RUN+="/bin/bash -c '/bin/sleep 5;
/sbin/ip a fl dev tap0'"


and I've activated it with :


udevadm trigger


and I've even rebooted and I've launched the freebsd vm. Unfortunately the
IP of tap0 didn't disappear. Maybe the log messages below can be useful for
you to understand the reason ?


[86.952262] bridge: filtering via arp/ip/ip6tables is no longer available by
default. Update your scripts to load br_netfilter if you need this.

[88.828606] br1: port 1(tap0) entered blocking state [ 88.828627] br1:
port 1(tap0) entered disabled state

[88.828941] device tap0 entered promiscuous mode

[88.829104] br1: port 1(tap0) entered blocking state [ 88.829119] br1:
port 1(tap0) entered forwarding state


Anyway,give a look at the rule below :


70-persistent-net.rules :

This file was automatically generated by the /lib/udev/write_net_rules

# program, run by the persistent-net-generator.rules rules file.
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# USB device 0x:0x (usb)

SUBSYSTEM=="net",
ACTION=="add",DRIVERS=="?*",ATTR{address}=="00:60:70:01:00:bf",
ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"


it uses *SUBSYSTEM=="net"*,but I'm using KERNEL=="tap0". I'm not sure that
KERNEL=="tap0" is correct. I suspect that SUBSYSTEM=="net" is better....or
?

Do you know where the error is ?

--
Mario.