Skip to content
Snippets Groups Projects
Commit e6f04a7f authored by Bob Mottram's avatar Bob Mottram
Browse files

Improve mesh firewall to block common bad guys

parent 54a6af69
No related branches found
No related tags found
No related merge requests found
......@@ -360,6 +360,32 @@ function mesh_firewall {
FIREWALL_FILENAME="${rootdir}/etc/systemd/system/meshfirewall.service"
MESH_FIREWALL_SCRIPT=${rootdir}/usr/bin/mesh-firewall
if ! grep -q 'telemetry.mozilla' ${rootdir}/etc/hosts; then
echo '127.0.0.1 telemetry.mozilla.org' >> ${rootdir}/etc/hosts
echo '127.0.0.1 incoming.telemetry.mozilla.org' >> ${rootdir}/etc/hosts
fi
if ! grep -q 'facebook' ${rootdir}/etc/hosts; then
echo { echo '127.0.0.1 www.facebook.com';
echo '127.0.0.1 facebook.com';
echo '127.0.0.1 static.ak.fbcdn.net';
echo '127.0.0.1 www.static.ak.fbcdn.net';
echo '127.0.0.1 login.facebook.com';
echo '127.0.0.1 www.login.facebook.com';
echo '127.0.0.1 fbcdn.net';
echo '127.0.0.1 www.fbcdn.net';
echo '127.0.0.1 fbcdn.com';
echo '127.0.0.1 www.fbcdn.com';
echo '127.0.0.1 static.ak.connect.facebook.com';
echo '127.0.0.1 www.static.ak.connect.facebook.com'; } >> ${rootdir}/etc/hosts
fi
if ! grep -q 'google' ${rootdir}/etc/hosts; then
{ echo '127.0.0.1 www.google-analytics.com';
echo '127.0.0.1 google-analytics.com';
echo '127.0.0.1 ssl.google-analytics.com'; } >> ${rootdir}/etc/hosts
fi
{ echo '#!/bin/bash';
echo 'iptables -P INPUT ACCEPT';
echo 'ip6tables -P INPUT ACCEPT';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment