| Line 1... |
Line 1... |
| 1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
| 2 |
# $Id: alcasar-iptables.sh 958 2012-07-19 09:01:30Z franck $
|
2 |
# $Id: alcasar-iptables.sh 990 2012-08-24 22:47:27Z franck $
|
| 3 |
# Script de mise en place des regles du parefeu d'Alcasar (mode normal)
|
3 |
# Script de mise en place des regles du parefeu d'Alcasar (mode normal)
|
| 4 |
# This script write the netfilter rules for ALCASAR
|
4 |
# This script write the netfilter rules for ALCASAR
|
| 5 |
# Rexy - 3abtux - CPN
|
5 |
# Rexy - 3abtux - CPN
|
| 6 |
#
|
6 |
#
|
| 7 |
# Reminders
|
7 |
# Reminders
|
| Line 112... |
Line 112... |
| 112 |
#############################
|
112 |
#############################
|
| 113 |
|
113 |
|
| 114 |
# Tout passe sur loopback
|
114 |
# Tout passe sur loopback
|
| 115 |
# accept all on loopback
|
115 |
# accept all on loopback
|
| 116 |
$IPTABLES -A INPUT -i lo -j ACCEPT
|
116 |
$IPTABLES -A INPUT -i lo -j ACCEPT
|
| - |
|
117 |
$IPTABLES -A OUTPUT -o lo -j ACCEPT
|
| 117 |
|
118 |
|
| 118 |
# Rejet des demandes de connexions non conformes (FIN-URG-PUSH, XMAS, NullScan, SYN-RST et NEW not SYN)
|
119 |
# Rejet des demandes de connexions non conformes (FIN-URG-PUSH, XMAS, NullScan, SYN-RST et NEW not SYN)
|
| 119 |
# Drop non standard connexions (FIN-URG-PUSH, XMAS, NullScan, SYN-RST et NEW not SYN)
|
120 |
# Drop non standard connexions (FIN-URG-PUSH, XMAS, NullScan, SYN-RST et NEW not SYN)
|
| 120 |
$IPTABLES -A INPUT -p tcp --tcp-flags FIN,URG,PSH FIN,URG,PSH -j DROP
|
121 |
$IPTABLES -A INPUT -p tcp --tcp-flags FIN,URG,PSH FIN,URG,PSH -j DROP
|
| 121 |
$IPTABLES -A INPUT -p tcp --tcp-flags ALL ALL -j DROP
|
122 |
$IPTABLES -A INPUT -p tcp --tcp-flags ALL ALL -j DROP
|