ath9k: merge a channel change fix from linux-wireless
[openwrt.git] / package / firewall / files / firewall.config
1 config defaults
2 option syn_flood 1
3 option input ACCEPT
4 option output ACCEPT
5 option forward REJECT
6 # Uncomment this line to disable ipv6 rules
7 # option disable_ipv6 1
8
9 config zone
10 option name lan
11 option network 'lan'
12 option input ACCEPT
13 option output ACCEPT
14 option forward REJECT
15
16 config zone
17 option name wan
18 option network 'wan'
19 option input REJECT
20 option output ACCEPT
21 option forward REJECT
22 option masq 1
23 option mtu_fix 1
24
25 config forwarding
26 option src lan
27 option dest wan
28
29 # We need to accept udp packets on port 68,
30 # see https://dev.openwrt.org/ticket/4108
31 config rule
32 option name Allow-DHCP-Renew
33 option src wan
34 option proto udp
35 option dest_port 68
36 option target ACCEPT
37 option family ipv4
38
39 # Allow IPv4 ping
40 config rule
41 option name Allow-Ping
42 option src wan
43 option proto icmp
44 option icmp_type echo-request
45 option family ipv4
46 option target ACCEPT
47
48 # Allow DHCPv6 replies
49 # see https://dev.openwrt.org/ticket/10381
50 config rule
51 option name Allow-DHCPv6
52 option src wan
53 option proto udp
54 option src_ip fe80::/10
55 option src_port 547
56 option dest_ip fe80::/10
57 option dest_port 546
58 option family ipv6
59 option target ACCEPT
60
61 # Allow essential incoming IPv6 ICMP traffic
62 config rule
63 option name Allow-ICMPv6-Input
64 option src wan
65 option proto icmp
66 list icmp_type echo-request
67 list icmp_type destination-unreachable
68 list icmp_type packet-too-big
69 list icmp_type time-exceeded
70 list icmp_type bad-header
71 list icmp_type unknown-header-type
72 list icmp_type router-solicitation
73 list icmp_type neighbour-solicitation
74 option limit 1000/sec
75 option family ipv6
76 option target ACCEPT
77
78 # Allow essential forwarded IPv6 ICMP traffic
79 config rule
80 option name Allow-ICMPv6-Forward
81 option src wan
82 option dest *
83 option proto icmp
84 list icmp_type echo-request
85 list icmp_type destination-unreachable
86 list icmp_type packet-too-big
87 list icmp_type time-exceeded
88 list icmp_type bad-header
89 list icmp_type unknown-header-type
90 option limit 1000/sec
91 option family ipv6
92 option target ACCEPT
93
94 # include a file with users custom iptables rules
95 config include
96 option path /etc/firewall.user
97
98
99 ### EXAMPLE CONFIG SECTIONS
100 # do not allow a specific ip to access wan
101 #config rule
102 # option src lan
103 # option src_ip 192.168.45.2
104 # option dest wan
105 # option proto tcp
106 # option target REJECT
107
108 # block a specific mac on wan
109 #config rule
110 # option dest wan
111 # option src_mac 00:11:22:33:44:66
112 # option target REJECT
113
114 # block incoming ICMP traffic on a zone
115 #config rule
116 # option src lan
117 # option proto ICMP
118 # option target DROP
119
120 # port redirect port coming in on wan to lan
121 #config redirect
122 # option src wan
123 # option src_dport 80
124 # option dest lan
125 # option dest_ip 192.168.16.235
126 # option dest_port 80
127 # option proto tcp
128
129 # port redirect of remapped ssh port (22001) on wan
130 #config redirect
131 # option src wan
132 # option src_dport 22001
133 # option dest lan
134 # option dest_port 22
135 # option proto tcp
136
137 # allow IPsec/ESP and ISAKMP passthrough
138 #config rule
139 # option src wan
140 # option dest lan
141 # option protocol esp
142 # option target ACCEPT
143
144 #config rule
145 # option src wan
146 # option dest lan
147 # option src_port 500
148 # option dest_port 500
149 # option proto udp
150 # option target ACCEPT
151
152 ### FULL CONFIG SECTIONS
153 #config rule
154 # option src lan
155 # option src_ip 192.168.45.2
156 # option src_mac 00:11:22:33:44:55
157 # option src_port 80
158 # option dest wan
159 # option dest_ip 194.25.2.129
160 # option dest_port 120
161 # option proto tcp
162 # option target REJECT
163
164 #config redirect
165 # option src lan
166 # option src_ip 192.168.45.2
167 # option src_mac 00:11:22:33:44:55
168 # option src_port 1024
169 # option src_dport 80
170 # option dest_ip 194.25.2.129
171 # option dest_port 120
172 # option proto tcp
This page took 0.068004 seconds and 5 git commands to generate.