Author Topic: Принудительная блокировка средствами iptables  (Read 2104 times)

hardcoreuk

  • Zen Warrior
  • ***
  • Posts: 112
  • Karma: +2/-0
    • View Profile
Есть задача заблокировать домен средствами iptables
не прокси, ничего локального, а именно заблокировать iptables
Раньше было
iptables -A FORWARD -p tcp -s ip-net/24 -d "domain.ru" -j DROP
Как заставить Zentyal сделать так  же...?
PS
Code: [Select]
#!/bin/sh

# This is the firewall postservice script and it's run after Zentyal
# has finished setting up the firewall.

# You can add here custom rules that you might need for your firewall

# The script will receive a command line argument indicating whether the
# module is enabled (1) or not (0).

if [ "$1" -eq "1" ]
then
    #add custom rules here
iptable -A FORWARD -d "getmyip.org" -j DROP
iptable -A FORWARD -d "getmyip.co.uk" -j DROP
iptable -A FORWARD -d "whatsmyipaddress.com" -j DROP
iptable -A FORWARD -d "whatismyip.org" -j DROP
iptable -A FORWARD -d "checkip.dyndns.org" -j DROP
    true
fi

exit 0

« Last Edit: September 10, 2012, 01:41:47 pm by hardcoreuk »