| Line 1... |
Line 1... |
| 1 |
#!/bin/sh
|
1 |
#!/bin/sh
|
| 2 |
#
|
2 |
#
|
| 3 |
# $Id: alcasar-iptables-local.sh 3018 2022-06-04 16:54:31Z rexy $
|
3 |
# $Id: alcasar-iptables-local.sh 3044 2022-07-24 21:55:18Z rexy $
|
| 4 |
#
|
4 |
#
|
| 5 |
# Custom rules for ALCASAR firewall
|
5 |
# Custom rules for ALCASAR firewall
|
| 6 |
#
|
6 |
#
|
| 7 |
# Examples:
|
7 |
# Examples:
|
| 8 |
# - Local MAC addresses filtering (MAC are in '/usr/local/etc/alcasar-iptables-local-mac-filtered'. Format : aa:09:23:2f:4d:ee)
|
8 |
# - Local MAC addresses filtering (MAC are in '/usr/local/etc/alcasar-iptables-local-mac-filtered'. Format : aa:09:23:2f:4d:ee)
|
| Line 34... |
Line 34... |
| 34 |
# On autorise le ping (echo & request) (ICMP N°0 & 8) en provenance d'Internet vers ALCASAR
|
34 |
# On autorise le ping (echo & request) (ICMP N°0 & 8) en provenance d'Internet vers ALCASAR
|
| 35 |
# Allow ping (echo & request) (ICMP N°0 & 8) from Internet
|
35 |
# Allow ping (echo & request) (ICMP N°0 & 8) from Internet
|
| 36 |
#$IPTABLES -A INPUT -i $EXTIF -p icmp --icmp-type 8 -j ACCEPT
|
36 |
#$IPTABLES -A INPUT -i $EXTIF -p icmp --icmp-type 8 -j ACCEPT
|
| 37 |
#$IPTABLES -A OUTPUT -o $EXTIF -p icmp --icmp-type 0 -j ACCEPT
|
37 |
#$IPTABLES -A OUTPUT -o $EXTIF -p icmp --icmp-type 0 -j ACCEPT
|
| 38 |
|
38 |
|
| 39 |
# On interdit les utilisateurs d'accéder à des réseaux situés entre ALCASAR et le routeur d'accès à Internet
|
39 |
# On interdit aux utilisateurs l'accés à d'autres réseaux privés
|
| 40 |
# Deny access of users to networks connected between ALCASAR and Internet broadband router
|
40 |
# Deny access of users to other private networks
|
| 41 |
#protectedNetworks='10.0.0.0/8,172.16.0.0/12,192.168.0.0/16' # (RFC 1918)
|
41 |
#protectedNetworks='10.0.0.0/8,172.16.0.0/12,192.168.0.0/16' # (RFC 1918)
|
| 42 |
#[ -n "$TUNIF" ] && consultationIF=$TUNIF || consultationIF=$INTIF
|
42 |
#[ -n "$TUNIF" ] && consultationIF=$TUNIF || consultationIF=$INTIF
|
| 43 |
#$IPTABLES -A FORWARD -i $consultationIF -d $protectedNetworks -j DROP
|
43 |
#$IPTABLES -A FORWARD -i $consultationIF -d $protectedNetworks -j DROP
|
| 44 |
#$IPTABLES -A FORWARD -o $consultationIF -s $protectedNetworks -j DROP
|
44 |
#$IPTABLES -A FORWARD -o $consultationIF -s $protectedNetworks -j DROP
|
| 45 |
|
45 |
|