Subversion Repositories ALCASAR

Rev

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

Rev 2645 Rev 2652
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $Id: alcasar-iptables-local.sh 2645 2018-10-29 17:47:51Z rexy $
3
# $Id: alcasar-iptables-local.sh 2652 2018-11-04 02:02:34Z tom.houdayer $
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 46... Line 46...
46
# Allow PAT (Port Adresse Translation)
46
# Allow PAT (Port Adresse Translation)
47
# example for the external UDP-TCP port 11222 which is redirected to the internal IP 192.168.182.10 on port 22
47
# example for the external UDP-TCP port 11222 which is redirected to the internal IP 192.168.182.10 on port 22
48
#$IPTABLES -A PREROUTING -i $EXTIF -t nat -p tcp -d $PUBLIC_IP --dport 11222 -j DNAT --to 192.168.182.10:22
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 udp -d $PUBLIC_IP --dport 11222 -j DNAT --to 192.168.182.10:22
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 -p tcp -d 192.168.182.10 --dport 22 -j ACCEPT
50
#$IPTABLES -A FORWARD -p tcp -d 192.168.182.10 --dport 22 -j ACCEPT
51
#$IPTABLES -A FORWARD -p ucp -d 192.168.182.10 --dport 22 -j ACCEPT
51
#$IPTABLES -A FORWARD -p udp -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