Last active
May 2, 2020 17:57
-
-
Save eliecharra/d1c459f9909dd6ab99570689fa5aab84 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
# Script to enable / disable ipv6 bridging on asuswrt | |
if [ "$2" == "connected" ]; then | |
echo "Adding rules to ebtables to bridge ipv6 traffic" | |
brctl addif br0 vlan2 | |
ebtables -t broute -A BROUTING -i vlan2 -p ! ipv6 -j DROP | |
fi | |
if [ "$2" == "disconnected" ]; then | |
brctl delif br0 vlan2 | |
ebtables -t broute -F | |
echo "Removed rules for ipv6 bridging" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment