aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-10-07 21:33:12 +0200
committerLudovic Courtès <ludo@gnu.org>2014-10-07 23:18:41 +0200
commitfa0c1d610444067001faaad204b25fa112fdc838 (patch)
treef4963ee4ea981e860d17ca8c11336fe4acc69594 /gnu
parent568841d4910df8ce904959b843c0c3559f282450 (diff)
downloadguix-fa0c1d610444067001faaad204b25fa112fdc838.tar
guix-fa0c1d610444067001faaad204b25fa112fdc838.tar.gz
services: Add '%facebook-host-aliases'.
* gnu/services/networking.scm (%facebook-host-aliases): New variable. * doc/guix.texi (Networking Services): Document it.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/networking.scm37
1 files changed, 36 insertions, 1 deletions
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 44e3c303de..8e682b9cfa 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -25,7 +25,8 @@
#:use-module (gnu packages messaging)
#:use-module (guix gexp)
#:use-module (guix monads)
- #:export (static-networking-service
+ #:export (%facebook-host-aliases
+ static-networking-service
dhcp-client-service
tor-service
bitlbee-service))
@@ -36,6 +37,40 @@
;;;
;;; Code:
+(define %facebook-host-aliases
+ ;; This is the list of known Facebook hosts to be added to /etc/hosts if you
+ ;; are to block it.
+ "\
+# Block Facebook IPv4.
+127.0.0.1 www.facebook.com
+127.0.0.1 facebook.com
+127.0.0.1 login.facebook.com
+127.0.0.1 www.login.facebook.com
+127.0.0.1 fbcdn.net
+127.0.0.1 www.fbcdn.net
+127.0.0.1 fbcdn.com
+127.0.0.1 www.fbcdn.com
+127.0.0.1 static.ak.fbcdn.net
+127.0.0.1 static.ak.connect.facebook.com
+127.0.0.1 connect.facebook.net
+127.0.0.1 www.connect.facebook.net
+127.0.0.1 apps.facebook.com
+
+# Block Facebook IPv6.
+fe80::1%lo0 facebook.com
+fe80::1%lo0 login.facebook.com
+fe80::1%lo0 www.login.facebook.com
+fe80::1%lo0 fbcdn.net
+fe80::1%lo0 www.fbcdn.net
+fe80::1%lo0 fbcdn.com
+fe80::1%lo0 www.fbcdn.com
+fe80::1%lo0 static.ak.fbcdn.net
+fe80::1%lo0 static.ak.connect.facebook.com
+fe80::1%lo0 connect.facebook.net
+fe80::1%lo0 www.connect.facebook.net
+fe80::1%lo0 apps.facebook.com\n")
+
+
(define* (static-networking-service interface ip
#:key
gateway