Subversion Repositories ALCASAR

Rev

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

Rev 2740 Rev 2833
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $Id: alcasar-iptables-local.sh 2740 2019-06-22 10:03:09Z rexy $
3
# $Id: alcasar-iptables-local.sh 2833 2020-06-14 10:13: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 41... Line 41...
41
#SMTP_IP='192.168.111.5'		# IP of mail server
41
#SMTP_IP='192.168.111.5'		# IP of mail server
42
#SMTP_PORT=587			# port of mail server (25 for SMTP ; 587 for STARTTLS ; 465 for SMTPS)
42
#SMTP_PORT=587			# port of mail server (25 for SMTP ; 587 for STARTTLS ; 465 for SMTPS)
43
#$IPTABLES -A OUTPUT -p tcp -d $SMTP_IP --dport $SMTP_PORT -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
43
#$IPTABLES -A OUTPUT -p tcp -d $SMTP_IP --dport $SMTP_PORT -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT
44
#$IPTABLES -A INPUT  -p tcp -s $SMTP_IP --sport $SMTP_PORT -m conntrack --ctstate ESTABLISHED     -j ACCEPT
44
#$IPTABLES -A INPUT  -p tcp -s $SMTP_IP --sport $SMTP_PORT -m conntrack --ctstate ESTABLISHED     -j ACCEPT
45
 
45
 
46
# On autorise du PAT (Port Adresse Translation) afin de pouvoir joindre des équipements du LAN depuis Internet
46
# On autorise du PAT (Port Adresse Translation) afin de pouvoir joindre des équipements du LAN à partir d'Internet
47
# Allow PAT (Port Adresse Translation)
47
# Allow PAT (Port Adresse Translation)
48
# example for the external UDP-TCP port 11222 which is redirected to the internal IP 192.168.182.10 on port 22
48
# example for the external UDP-TCP port 11222 which is redirected to the internal IP 192.168.182.10 on port 22
49
#$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 --dport 11222 -j DNAT --to 192.168.182.10:22
50
#$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 PREROUTING -i $EXTIF -t nat -p udp -d $PUBLIC_IP --dport 11222 -j DNAT --to 192.168.182.10:22
51
#$IPTABLES -A FORWARD -p tcp -d 192.168.182.10 --dport 22 -j ACCEPT
51
#$IPTABLES -A FORWARD -p tcp -d 192.168.182.10 --dport 22 -j ACCEPT