Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37553073
en ru br
ALT Linux repositórios
S:3.15-alt1
5.0: 3.7-alt2
4.1: 3.7-alt2
4.0: 3.7-alt2
3.0: 3.5-alt16
+updates:3.5-alt16.1

Group :: Rede/Outros
RPM: rp-pppoe

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

#!/bin/sh
#
# firewall-standalone-iptables This script sets up firewall rules for a standalone machine.
#
# üÔÏÔ ÓËÒÉÐÔ ÕÓÔÁÎÁ×ÌÉ×ÁÅÔ ÐÒÁ×ÉÌÁ ÆÉÌØÔÁÃÉÉ ÐÁËÅÔÏ×.
#
# Copyright (C) 2002 ALT Linux Team. This software may be distributed under the terms
# of the GNU General Public License, version 2 or any later version.

# Interface to Internet

EXTIF=ppp+

ANY=0.0.0.0/0

iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD DROP

iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD

# Syn-flood protection.
# úÁÝÉÔÁ ÏÔ Syn-flood.
iptables -A INPUT -p tcp --syn -m limit --limit 1/s -j ACCEPT

# Furtive port scanner.
# úÁÝÉÔÁ ÏÔ ÓËÒÙÔÏÇÏ ÓËÁÎÉÒÏ×ÁÎÉÑ ÐÏÒÔÏ×.
iptables -A INPUT -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s -j ACCEPT

# Ping of death.
# úÁÝÉÔÁ ÏÔ Ping of death.
iptables -A INPUT -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT

# Deny NEW end INVALID incoming or required routings packets from ppp0
# úÁÐÒÅÝÁÅÍ NEW É INVALID ×ÈÏÄÑÝÉÅ ÐÁËÅÔÙ Ó ppp0.
iptables -A INPUT -i $EXTIF -m state --state NEW,INVALID -j DROP

# Allow a packets which is related to, and part of an existing connection.
# òÁÚÒÅÛÁÅÍ ÐÁËÅÔÙ ÐÒÉÎÁÄÌÅÖÁÝÉÅ É ÏÔÎÏÓÑÝÉÅÓÑ Ë ÕÖÅ ÕÓÔÁÎÏ×ÌÅÎÎÏÍÕ ÓÏÅÄÉÎÅÎÉÀ.
iptables -N block
iptables -A block -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A block -m state --state NEW -i ! $EXTIF -j ACCEPT
iptables -A block -j DROP

iptables -A INPUT -j block
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009