Block IP's by countries
#!/bin/bash
# block countries with iptables based on list with range of ips
# download list with range of countries ips
rm -rf /tmp/all-zones*; wget -nc http://www.ipdeny.com/ipblocks/data/countries/all-zones.tar.gz -P /tmp
mkdir /tmp/all-zones; tar -xzvf /tmp/all-zones.tar.gz -C $_
COUNTRIES_ISO_CODE_LIST=(af cu mo)
for country_iso_code in ${COUNTRIES_ISO_CODE_LIST[*]}; do
for country_ip in $( cat /tmp/all-zones/$country_iso_code.zone ); do
echo creating rules to $country_iso_code $country_ip
/sbin/iptables -A INPUT -s $country_ip -m comment --comment "rule to $( echo $country_iso_code | tr '[:lower:]' '[:upper:]' ) country" -j DROP
done
done
Export/import windows server DNS zones
You can use Export-DnsServerZone and Import-DnsServerZone . Export: Export-DnsServerZone -Name "test.com" -Filename "test...
Mais vistos
-
Find Users Who Have Never Logged On Use the following PowerShell Command; Get-ADUser -Filter { LastLogonDate -notlike "*" -and En...
-
Java Keytool Command These commands allow you to generate a new Java Keytool keystore file, create a CSR, and import certificates. A...
-
First you have to configure a wpad site in your IIS Open the proxypac.pac file you have previously created and save as wpad.dat. Copy wpa...