#!/bin/sh # LinkLocal "fe80::/64" | "fe80::/10" local network="$network;${net6}" # ruleOut : iptables -t filter -A OUTPUT -o ""$eth"" -j ""$rulesOut"" # ruleIn : iptables -t filter -A INPUT -i ""$eth"" -j ""$rulesIn"" # dropOut : iptables -t filter -A OUTPUT -o ""$eth"" -j ""$rulesOut"" # dropIn : iptables -t filter -A INPUT -i ""$eth"" -j ""$rulesIn"" for subnet in "fe80::/10";do # === TYPE 134 : Router Advertisement === #NETFILTER6_INPUTIN=eth1 OUT= MAC=33:33:00:00:00:01:ac:f1:df:79:24:fe:86:dd SRC=fe80:0000:0000:0000:aef1:dfff:fe79:24fe # DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=232 TC=0 HOPLIMIT=255 FLOWLBL=711275 PROTO=ICMPv6 TYPE=134 CODE=0 MARK=0xa local dropIn="$dropIn ;icmp | -s "${subnet}" -d ff02::1/128 -p icmpv6 --icmpv6-type 134/0 -m hl --hl-eq 255" done # clients : PROTO ; PORT ; UID/GID ; UID/GID ; UID/GID .... | # servers : PROTO ; PORT ; UID/GID ; UID/GID ; UID/GID .... | # forward : PROTO ; PORT | # -- CLIENT -- # apprentissage ipv6 #local clients="$clients|UDP ;0:65535 ;root/root" #local clients="$clients|TCP ;0:65535 ;root/root" # -- SERVER -- #local servers="$servers|UDP ;0:65535 ;root/root" #local servers="$servers|TCP ;0:65535 ;root/root" # TYPE 130 : Multicast Listener Query #local ruleIn="$ruleIn ;icmp | -d ff02::/16 -s "${ip}" -p icmpv6 --icmpv6-type 130/0"