remove default network config for brcm
[openwrt.git] / package / iptables / files / firewall.user
1 #!/bin/sh
2 # Copyright (C) 2006 OpenWrt.org
3
4 iptables -F input_rule
5 iptables -F output_rule
6 iptables -F forwarding_rule
7 iptables -t nat -F prerouting_rule
8 iptables -t nat -F postrouting_rule
9
10 ### BIG FAT DISCLAIMER
11 ## The "-i $WAN" is used to match packets that come in via the $WAN interface.
12 ## it WILL NOT MATCH packets sent from the $WAN ip address -- you won't be able
13 ## to see the effects from within the LAN.
14
15 ### Open port to WAN
16 ## -- This allows port 22 to be answered by (dropbear on) the router
17 # iptables -t nat -A prerouting_rule -i $WAN -p tcp --dport 22 -j ACCEPT
18 # iptables -A input_rule -i $WAN -p tcp --dport 22 -j ACCEPT
19
20 ### Port forwarding
21 ## -- This forwards port 8080 on the WAN to port 80 on 192.168.1.2
22 # iptables -t nat -A prerouting_rule -i $WAN -p tcp --dport 8080 -j DNAT --to 192.168.1.2:80
23 # iptables -A forwarding_rule -i $WAN -p tcp --dport 80 -d 192.168.1.2 -j ACCEPT
24
25 ### DMZ
26 ## -- Connections to ports not handled above will be forwarded to 192.168.1.2
27 # iptables -t nat -A prerouting_rule -i $WAN -j DNAT --to 192.168.1.2
28 # iptables -A forwarding_rule -i $WAN -d 192.168.1.2 -j ACCEPT
This page took 0.051466 seconds and 5 git commands to generate.