Skip to content

Commit

Permalink
IP6PREFIX as variable in post-puppet.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
rubo77 committed Nov 15, 2016
1 parent 46d25b4 commit 9c5d75f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions post-puppet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
VPN_NUMBER=6
DOMAIN=freifunk.in-kiel.de
TLD=ffki
IP6PREFIX=fda1:384a:74de:4242

#NGINX, if needed to serve the firmware for the auto-updater
#apt-get install -y nginx
Expand All @@ -27,21 +28,21 @@ EOF

mv /etc/radvd.conf /etc/radvd.conf.bak
cat >> /etc/radvd.conf << EOF
# managed for interface br-ffki
interface br-ffki
# managed for interface br-$TLD
interface br-$TLD
{
AdvSendAdvert on;
AdvDefaultLifetime 0; # Here
IgnoreIfMissing on;
MaxRtrAdvInterval 200;
prefix fda1:384a:74de:4242:0000:0000:0000:0000/64
prefix $IP6PREFIX:0000:0000:0000:0000/64
{
AdvPreferredLifetime 14400; # Here
AdvValidLifetime 86400; # Here
};
RDNSS fda1:384a:74de:4242::ff0$VPN_NUMBER
RDNSS $IP6PREFIX::ff0$VPN_NUMBER
{
};
Expand All @@ -51,7 +52,7 @@ interface br-ffki
};
};
EOF
cp /etc/radvd.conf /etc/radvd.conf.d/interface-br-ffki.conf
cp /etc/radvd.conf /etc/radvd.conf.d/interface-br-$TLD.conf

# set conntrack_max higher so more connections are possible:
/sbin/sysctl -w net.netfilter.nf_conntrack_max=1048576 && echo net.ipv4.netfilter.ip_conntrack_max = 1048576 >> /etc/sysctl.conf
Expand Down

0 comments on commit 9c5d75f

Please sign in to comment.