aggiunta gestione regole firewall in uscita

This commit is contained in:
cmaffio
2016-06-16 17:04:05 +02:00
parent 7089dbe2a7
commit 848720f5c5
5 changed files with 257 additions and 5 deletions

41
firewall/tmp/fw.new Normal file
View File

@@ -0,0 +1,41 @@
fw_custom_after_chain_creation() {
# REGOLE DINAMICHE
### START REGOLA-U1 ###
iptables -N REGOLA-U1
iptables -I REGOLA-U1 -p tcp -o bond0 -s 192.168.1.1 --sport 25 -d 151.1.219.70 --dport 443 -j ACCEPT
iptables -I REGOLA-U1 -p tcp -i bond0 -d 192.168.1.1 --dport 25 -s 151.1.219.70 --sport 443 -j ACCEPT
iptables -I FORWARD -j REGOLA-U1
### STOP REGOLA-U1 ###
### START REGOLA-U3 ###
iptables -N REGOLA-U3
iptables -I REGOLA-U3 -p udp -o bond0 -s 192.168.1.3 --sport 45 -d 151.1.219.70 --dport 6754 -j ACCEPT
iptables -I REGOLA-U3 -p udp -i bond0 -d 192.168.1.3 --dport 45 -s 151.1.219.70 --sport 6754 -j ACCEPT
iptables -I FORWARD -j REGOLA-U3
### STOP REGOLA-U3 ###
# FINE REGOLE DINAMICHE
true
}
fw_custom_before_port_handling() {
true
}
fw_custom_before_masq() {
true
}
fw_custom_before_denyall() {
true
}
fw_custom_after_finished() {
true
}