Skip to content

Instantly share code, notes, and snippets.

rtr2/bgpd.conf:
rtr2/bgpd.conf:peer_impresa_site1="10.10.107.241"
rtr2/bgpd.conf:upstream1="10.20.136.161"
rtr2/bgpd.conf:upstream2="10.20.136.162"
rtr2/bgpd.conf:pt="{$peer1,$peer2}"
rtr2/bgpd.conf:bgp_networks="{10.20.249.144/28, 10.10.106.0/23, 10.10.106.0/24, 10.10.107.0/24, 10.30.23.0/24 }"
rtr2/bgpd.conf:
rtr2/bgpd.conf:AS 65530
rtr2/bgpd.conf:router-id 10.20.136.166
rtr2/bgpd.conf:holdtime 3
rtr1/bgpd.conf:
rtr1/bgpd.conf:internal_peer="10.10.107.242"
rtr1/bgpd.conf:upstream1="10.20.136.161"
rtr1/bgpd.conf:upstream2="10.20.136.162"
rtr1/bgpd.conf:pt="{$upstream1, $upstream2 }"
rtr1/bgpd.conf:bgp_networks="{10.20.249.144/28, 10.10.106.0/23, 10.10.106.0/24, 10.10.107.0/24, 10.30.23.0/24 }"
rtr1/bgpd.conf:
rtr1/bgpd.conf:AS 65529
rtr1/bgpd.conf:router-id 10.20.136.165
rtr1/bgpd.conf:holdtime 3
#!/bin/sh
(
# Retrieves ad blacklist and adds them to unbound as NXDOMAIN
ftp -V -o - http://winhelp2002.mvps.org/hosts.txt | awk '!/^#/ {print $2}' |egrep -v '^$|localhost' | sort -u | sed -e 's/
//g' | sed 's/^/local-zone: \"/' | sed 's/$/\" static/'
# Retrieves URLs from phishtank and adds them to unbound as NXDOMAIN
# It might be a good idea to get an API key at phishtank for the download
@pedrompcaetano
pedrompcaetano / gist:c141836846f1f6396dfb
Created August 26, 2015 13:13
filtering prefixes by AS
https://anuragbhatia.com/networking/using-bgpq3-for-automated-filter-generation/
ssh-keygen -y > id_rsa.pub
Index: acpimadt.c
===================================================================
RCS file: /data/src/openbsd/src/sys/dev/acpi/acpimadt.c,v
retrieving revision 1.31
diff -u -p -r1.31 acpimadt.c
--- acpimadt.c 9 Feb 2015 08:15:19 -0000 1.31
+++ acpimadt.c 24 Jun 2015 22:33:04 -0000
@@ -239,13 +239,13 @@ acpimadt_attach(struct device *parent, s
entry->madt_lapic.apic_id,
entry->madt_lapic.flags);
@pedrompcaetano
pedrompcaetano / block country @ pf
Last active August 29, 2015 14:19
replace table contents instead of reloading pf ruleset at each crontab interval
#!/bin/sh
PFDIR=/etc/pf-files
ZONEFILE=blocked_zones
mkdir -p ${PFDIR}
> ${PFDIR}/${ZONEFILE}
for ZONE in cn az by kz kg ru tj tm uz vn
do
[pcae@Agnes ~]$ cat .bashrc
# .bashrc
[ -z "$PS1" ] && return
source /home/pcae/.bashrc-tmux
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi