Skip to content

Commit

Permalink
template: block UDP multicast
Browse files Browse the repository at this point in the history
  • Loading branch information
yoursunny committed Dec 6, 2016
1 parent b7d8b2f commit a307ad9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions template/block-ctrl-mcast.sh
@@ -1,10 +1,11 @@
#!/bin/bash

# block UdpMulticastFace on Emulab control NIC
# block UDP multicast with iptables
CTRL_NIC=$(ip addr show to 155.98.0.0/16 | sed -n 's|.*: \(eth[0-9]\): <.*|\1|p')
CTRL_IP=$(ip addr show to 155.98.0.0/16 | sed -n 's|.*inet \([^/]*\)/.*|\1|p')

sudo iptables -I OUTPUT -o $CTRL_NIC -d 224.0.23.170 -j DROP

# EthernetFace cannot be blocked via iptables, because netfilter works on IP layer, while EthernetFace uses pcap

# block Ethernet multicast via NFD configuration
sudo infoedit -f /usr/local/etc/ndn/nfd.conf.sample -s face_system.ether.blacklist.subnet -v 155.98.0.0/16
sudo cp /usr/local/etc/ndn/nfd.conf.sample /usr/local/etc/ndn/nfd.conf

0 comments on commit a307ad9

Please sign in to comment.