Subversion Repositories ALCASAR

Rev

Rev 2621 | Rev 2652 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2621 Rev 2645
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $Id: alcasar-iptables-local.sh 2621 2018-08-28 22:36:58Z tom.houdayer $
3
# $Id: alcasar-iptables-local.sh 2645 2018-10-29 17:47:51Z 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 42... Line 42...
42
#$IPTABLES -A OUTPUT -p tcp -d $SMTP_IP --dport $SMTP_PORT -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
42
#$IPTABLES -A OUTPUT -p tcp -d $SMTP_IP --dport $SMTP_PORT -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
43
#$IPTABLES -A INPUT  -p tcp -s $SMTP_IP --sport $SMTP_PORT -m conntrack --ctstate ESTABLISHED     -j ACCEPT
43
#$IPTABLES -A INPUT  -p tcp -s $SMTP_IP --sport $SMTP_PORT -m conntrack --ctstate ESTABLISHED     -j ACCEPT
44
 
44
 
45
# On autorise du PAT (Port Adresse Translation) afin de pouvoir joindre des équipements du LAN depuis Internet
45
# On autorise du PAT (Port Adresse Translation) afin de pouvoir joindre des équipements du LAN depuis Internet
46
# Allow PAT (Port Adresse Translation)
46
# Allow PAT (Port Adresse Translation)
47
#m_ports=5000,5001
47
# example for the external UDP-TCP port 11222 which is redirected to the internal IP 192.168.182.10 on port 22
48
#to_ip=192.168.182.3
48
#$IPTABLES -A PREROUTING -i $EXTIF -t nat -p tcp -d $PUBLIC_IP --dport 11222 -j DNAT --to 192.168.182.10:22
49
#$IPTABLES -A PREROUTING -i $EXTIF -t nat -p tcp -d $PUBLIC_IP -m multiport --dports $m_ports -j DNAT --to $to_ip
49
#$IPTABLES -A PREROUTING -i $EXTIF -t nat -p udp -d $PUBLIC_IP --dport 11222 -j DNAT --to 192.168.182.10:22
50
#$IPTABLES -A FORWARD -i $EXTIF -p tcp -d $to_ip -m multiport --dports $m_ports -j ACCEPT
50
#$IPTABLES -A FORWARD -p tcp -d 192.168.182.10 --dport 22 -j ACCEPT
51
#$IPTABLES -A FORWARD -o $EXTIF -p tcp -s $to_ip -m multiport --sports $m_ports -j ACCEPT
51
#$IPTABLES -A FORWARD -p ucp -d 192.168.182.10 --dport 22 -j ACCEPT
52
 
52
 
53
# Deny access to protected networks from internal LAN
53
# Deny access to protected networks from internal LAN
54
#protectedNetworks='10.0.0.0/8,172.16.0.0/12,192.168.0.0/16' # (RFC 1918)
54
#protectedNetworks='10.0.0.0/8,172.16.0.0/12,192.168.0.0/16' # (RFC 1918)
55
#[ -n "$TUNIF" ] && consultationIF=$TUNIF || consultationIF=$INTIF
55
#[ -n "$TUNIF" ] && consultationIF=$TUNIF || consultationIF=$INTIF
56
#$IPTABLES -A FORWARD -i $consultationIF -d $protectedNetworks -j DROP
56
#$IPTABLES -A FORWARD -i $consultationIF -d $protectedNetworks -j DROP