#!/bin/bash

echo Create internal dummy0 interface

echo "dummy" > /etc/modules-load.d/dummy.conf
echo "options dummy numdummies=1" > /etc/modprobe.d/dummy.conf

cat > /etc/NetworkManager/dispatcher.d/98-dummy0 <<-EOF
#!/bin/sh
# Remember to make this file executable!
# Create the dummy interface.
/sbin/ip link add dummy0 type dummy
/sbin/ip link set dummy0 multicast on
/sbin/ip addr add 10.101.0.101/32 dev dummy0 
/sbin/ip link set dummy0 up
EOF

chmod +x /etc/NetworkManager/dispatcher.d/98-dummy0

/etc/NetworkManager/dispatcher.d/98-dummy0
