quinta-feira, 11 de junho de 2015

New Debian "Jessie" Screeshots & Simple Firewall


Debian "Jessie" with Mate 1.8.2 interface:



I liked, stable, fast and modern visulal. But it is not yet mature.


Firewall Script (for workstation, one NIC):

#!/bin/sh
#Firewall netfilter desenvolvido por Henrique Kbs

iptables -F
iptables -X
iptables -t nat -F
iptables -t mangle -F

IPT="/sbin/iptables"

$IPT -P INPUT DROP
$IPT -P FORWARD DROP
$IPT -P OUTPUT ACCEPT

AP="ACCEPT"
DP="DROP"
REDE="192.168.1.0/24"
SERVER="192.168.1.1/32"

$IPT -N C_NIC

$IPT -A INPUT -i eth0 -j C_NIC
$IPT -A FORWARD -i eth0 -j C_NIC
$IPT -A FORWARD -o eth0 -j C_NIC

$IPT -A OUTPUT -p tcp -m state --state NEW,ESTABLISHED -j $AP
$IPT -A OUTPUT -p icmp --icmp-type 8 -m limit --limit 2/s -j $AP
$IPT -A OUTPUT -o lo -j $AP

$IPT -A INPUT -i lo -j $AP

$IPT -A C_NIC -p udp --sport 1024:65535 --dport 53 -j $AP
$IPT -A C_NIC -p udp --sport 53 --dport 1024:65535 -j $AP

$IPT -A C_NIC -p tcp --sport 1024:65535 --dport 80:443 -j $AP
$IPT -A C_NIC -p tcp --sport 80:443 --dport 1024:65535 -j $AP

$IPT -A C_NIC -p tcp --sport 1024:65535 --dport 22 -j $AP
$IPT -A C_NIC -p tcp --sport 22 --dport 1024:65535 -j $AP

$IPT -A C_NIC -p tcp --sport 1024:65535 --dport 3389 -j $AP
$IPT -A C_NIC -p tcp --sport 3389 --dport 1024:65535 -j $AP

$IPT -A C_NIC -p tcp --sport 1024:65535 --dport 1:65535 -j $AP
$IPT -A C_NIC -p tcp --sport 1:65535 --dport 1024:65535 -j $AP

$IPT -A C_NIC -p icmp --icmp-type 0 -m limit --limit 2/s -j $AP

$IPT -A C_NIC -m limit --limit 1/s -p udp --sport 137:138 --dport 137:138 -j $AP

$IPT -A C_NIC -m limit --limit 1/s -d 224.0.0.0/24 -j $AP

$IPT -A C_NIC -m limit --limit 1/s -d 192.168.1.255 -j $AP

$IPT -A C_NIC -m limit --limit 1/s -d 255.255.255.255 -j $AP

$IPT -A C_NIC -m limit --limit 7/m --limit-burst 1 -j LOG --log-prefix "FW_ALL_NIC_log:"

$IPT -A C_NIC -p tcp --syn -j $DP
$IPT -A C_NIC -p udp --dport 0:1024 -j $DP

$IPT -t nat -A POSTROUTING -o eth0 -j MASQUERADE

iptables-save

watch -n 1 -d iptables -nvL





#apt-cache search comments