ansible.fftdf.supernode/files/bataddif.sh.j2
Roman Katrincak 6e9eea7f62 Minor fixes
Split traffic ICMP & TCP/UDP <1024 with local exit
TCP/UDP =>1024 exit @ Freifunk backbone
Start script now in cron @reboot
2015-12-03 22:01:23 +01:00

29 lines
561 B
Django/Jinja

#!/bin/bash
INTERFACE="$3"
#MAC="$8"
#BLACKLISTFILE=/opt/freifunk/blockliste.txt
#if [ -f /opt/freifunk/blockliste.txt ]
#if [ -f $BLACKLISTFILE ]
# then
# BLOCKLISTE=$(cat /opt/freifunk/blockliste.txt)
# else
# touch=$BLOCKLISTE
#fi
#for i in $BLOCKLISTE;
#do
# if [[ $i == $MAC ]]; then
# exit 1
# fi
#done
#ip link set address {{ sn_mesh_MAC }} dev $INTERFACE
ifconfig $INTERFACE hw ether {{ sn_mesh_MAC }}
ip link set dev $INTERFACE up mtu 1312
/sbin/sysctl net.ipv4.conf.$INTERFACE.rp_filter=0
/usr/sbin/batctl if add $INTERFACE