This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
148: | |
- 4 | |
- :conn_id | |
8: | |
- :ip4_addr | |
- :ipv4_src_addr | |
7: | |
- 2 | |
- :src_port |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/vbash | |
NETGROUP="SPAMHAUS_DROP" | |
>/tmp/block | |
curl -s http://www.spamhaus.org/drop/drop.txt | grep '^[0-9]' | sed -e 's/;.*//' >> /tmp/block | |
curl -s http://www.spamhaus.org/drop/edrop.txt | grep '^[0-9]' | sed -e 's/;.*//' >> /tmp/block | |
sudo ipset -q -L $NETGROUP > /dev/null 2>&1 | |
if [ "$?" != 0 ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NETGROUP="SPAMHAUS_DROP" | |
TMPFILE=/tmp/spamhaus-block-$$.tmp | |
TMPFILE2=/tmp/temp-spamhaus-block-$$.tmp | |
clean_up () | |
{ | |
/sbin/ipset --destroy $NEWGROUP | |
/bin/rm $TMPFILE $TMPFILE2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
NETGROUP="ET-A" | |
curl -O http://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt | |
getnetblocks() { | |
cat <<EOF | |
# Generated by ipset | |
-N geotmp nethash --hashsize 1024 --probes 4 --resize 20 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
################################################################################# | |
# File Name : gen_blacklist.sh | |
# Created By : wirerydr | |
# Creation Date : [2016-08-25 14:24] | |
# Last Modified : [2016-09-26 23:08] | |
# Description : Creates a blacklist from various sources | |
################################################################################# | |
# 03e95a9 (2016-09-26) : Reinstated cleanup code in exit trap | |
# fb5995a (2016-09-26) : Added instructive comments to output header |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://pgl.yoyo.org/as/iplist.php | |
http://www.spamhaus.org/drop/drop.txt | |
http://www.spamhaus.org/drop/edrop.txt | |
http://www.okean.com/sinokoreacidr.txt | |
http://lists.blocklist.de/lists/all.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyCallable(object): | |
def __init__(self, urlparts, callable): | |
self.urlparts = urlparts | |
self.callable = callable | |
def __call__(self, **kwargs): | |
print kwargs | |
print self.urlparts | |
def __getattr__(self, name): | |
# Return a callable object of this same type so that you can just keep | |
# chaining together calls and just adding that missing attribute to the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Please edit /etc/default/ufw first | |
# DEFAULT_FORWARD_POLICY="ACCEPT" | |
# then at /etc/ufw/sysctl.conf | |
# net/ipv4/ip_forward=1 | |
# net/ipv6/conf/default/forwarding=1 | |
# allow mtu dectection | |
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip access-list extended cp-any-any | |
permit ip any any | |
ip access-list extended cp-dns | |
permit udp host 66.230.128.14 eq domain any | |
permit udp host 66.230.128.18 eq domain any | |
ip access-list extended cp-fragments | |
permit ip any any fragments |
OlderNewer