Skip to content

Commit a441f0e

Browse files
committed
Reduce impact of firewall rules
This modification reduces the IPTABLES rules to the minimum needed. Specifically, it does NOT create default rules, or edit any existing rules. Instead, it only adds rules to drop mDNS at 5353/udp, and to drop all incoming traffic that's addressed to the mDNS multicast IP address.
1 parent 157ac15 commit a441f0e

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

.travis.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ addons:
4343
confinement: classic
4444

4545
install:
46+
# Filter only mDNS / Bonjour traffic
47+
- sudo iptables --insert INPUT --jump DROP --protocol udp --dport 5353 -m comment --comment "silently drop all 5353/udp input"
48+
- sudo iptables --insert INPUT --jump DROP --destination 224.0.0.251 -m comment --comment "silently drop all mDNS ipv4 broadcast"
49+
# Install the nRF52 support files for arduino
4650
- pip3 install --user adafruit-nrfutil
4751
- umake electronics arduino $HOME/arduino_ide
4852
- export PATH=$HOME/arduino_ide:$PATH
@@ -53,17 +57,6 @@ install:
5357
- rm -r $BSP_PATH/*
5458
- ln -s $TRAVIS_BUILD_DIR $BSP_PATH/$BSP_VERSION
5559
- arduino --install-library "Adafruit NeoPixel","Adafruit NeoMatrix","Adafruit GFX Library","Adafruit SSD1306","MIDI Library","Adafruit ILI9341","Adafruit HX8357 Library"
56-
# TODO: find way to filter out the noisy mDNS output from arduino IDE...
57-
# See https://forum.arduino.cc/index.php?topic=469428.0
58-
# See https://github.com/per1234/arduino-ci-script/issues/1
59-
# Arduino IDE adds a lot of noise caused by network traffic (mDNS?)
60-
# The following lines attempt to firewall it to prevent polluted error logs....
61-
- sudo iptables -P INPUT DROP
62-
- sudo iptables -P FORWARD DROP
63-
- sudo iptables -P OUTPUT ACCEPT
64-
- sudo iptables -A INPUT -i lo -j ACCEPT
65-
- sudo iptables -A OUTPUT -o lo -j ACCEPT
66-
- sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
6760

6861
before_script:
6962

0 commit comments

Comments
 (0)