1 # Copyright (C) 2006 OpenWrt.org
7 ($
1 ==
"accept") || ($
1 ==
"drop") || ($
1 ==
"forward") {
10 if ((_l
["proto"] ==
"") && (_l
["sport"] _l
["dport"] != "")) {
21 print "iptables -t nat -A prerouting_wan" _opt
[o
] str2ipt
($
2) target
22 print "iptables -A input_wan " _opt
[o
] str2ipt
($
2) target
29 print "iptables -t nat -A prerouting_wan" _opt
[o
] str2ipt
($
2) " -j DROP"
35 target =
" -j DNAT --to " $
3
38 if ((_l
["proto"] ==
"tcp") || (_l
["proto"] ==
"udp") || (_l
["proto"] ==
"")) {
39 if (_l
["proto"] != "") fwopts =
" -p " _l
["proto"]
40 fwopts = fwopts
" --dport " $
4
41 target = target
":" $
4
46 print "iptables -t nat -A prerouting_wan" _opt
[o
] str2ipt
($
2) target
47 print "iptables -A forwarding_wan " _opt
[o
] " -d " $
3 fwopts
" -j ACCEPT"
This page took 0.037981 seconds and 5 git commands to generate.