add ipv6 examples
[pve-firewall.git] / debian / example / 100.fw
1 # Example VM firewall configuration
2
3 # VM specific firewall options
4 [OPTIONS]
5
6 # disable/enable the whole thing
7 enable: 1
8
9 # disable/enable MAC address filter
10 macfilter: 0
11
12 # default policy
13 policy_in: DROP
14 policy_out: REJECT
15
16 # log dropped incoming connection
17 log_level_in: info
18
19 # disable log for outgoing connections
20 log_level_out: nolog
21
22 # enable DHCP
23 dhcp: 1
24
25 # enable ips
26 ips: 1
27
28 # specify nfqueue queues (optionnal)
29 #ips_queues: 0
30 ips_queues: 0:3
31
32 [IPSET ipfilter-net0] # only allow specified IPs on net0
33 192.168.2.10
34
35 [RULES]
36
37 #TYPE ACTION [OPTIONS]
38 # -i <INTERFACE>
39 # -source <SOURCE>
40 # -dest <DEST>
41 # -p <PROTOCOL>
42 # -dport <DESTINATION_PORT>
43 # -sport <SOURCE_PORT>
44
45 IN SSH(ACCEPT) -i net0
46 IN SSH(ACCEPT) -i net0 # a comment
47 IN SSH(ACCEPT) -i net0 -source 192.168.2.192 # only allow SSH from 192.168.2.192
48 IN SSH(ACCEPT) -i net0 -source 10.0.0.1-10.0.0.10 #accept SSH for ip in range 10.0.0.1 to 10.0.0.10
49 IN SSH(ACCEPT) -i net0 -source 10.0.0.1,10.0.0.2,10.0.0.3 #accept ssh for 10.0.0.1 or 10.0.0.2 or 10.0.0.3
50 IN SSH(ACCEPT) -i net0 -source +mynetgroup #accept ssh for ipset mynetgroup
51 IN SSH(ACCEPT) -i net0 -source myserveralias #accept ssh for alias myserveralias
52 IN SSH(ACCEPT) -i net0 -source FE80:0000:0000:0000:0202:B3FF:FE1E:8329
53 IN ACCEPT -i net0 -p icmpv6
54
55 |IN SSH(ACCEPT) -i net0 # disabled rule
56
57 # add a security group
58 GROUP group1 -i net0
59
60 OUT DNS(ACCEPT) -i net0
61 OUT Ping(ACCEPT) -i net0
62 OUT SSH(ACCEPT)
63
64
65