1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-09-03 19:04:15 +03:00
Commit Graph

19 Commits

Author SHA1 Message Date
jow
57968b17ca [package] firewall: add support for "local" port forwards which target an internal address on the router itself
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29687 3c298f89-4303-0410-b956-a3cf2f4a3e73
2012-01-08 15:29:24 +00:00
jow
fb73402d37 [package] firewall: make sure that -m mac is used with --mac-source, follow up to r27508
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27519 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-07 10:28:31 +00:00
cshore
80866b730c [package] firewall: also correct another variable missed in previous commit
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27508 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-07 08:59:40 +00:00
cshore
1dea2290d8 [package] firewall: fix wrong variable names for protocol command line parameter - were missed during r27500
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27507 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-07 08:54:29 +00:00
jow
0be37efeae [package] firewall:
- solve scoping issues when multiple values are used, thanks Daniel Dickinson
	- ignore src_port/dest_port for proto icmp rules, ignore icmp_type for non-icmp rules
	- properly handle icmp when proto is given in numerical form (1, 58)
	- support negated icmp types


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27500 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-07-06 22:10:46 +00:00
jow
e21fd93d0f [package] firewall: restore local port relocation ability from r26617
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27318 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-06-30 01:36:09 +00:00
jow
87281df903 [package] firewall:
- allow multiple ports, protocols, macs, icmp types per rule
	- implement "limit" and "limit_burst" options for rules
	- implement "extra" option to rules and redirects for passing arbritary flags to iptables
	- implement negations for "src_port", "dest_port", "src_dport", "src_mac", "proto" and "icmp_type" options
	- allow wildcard (*) "src" and "dest" options in rules to allow specifying "any" source or destination
	- validate symbolic icmp-type names against the selected iptables binary
	- properly handle forwarded ICMPv6 traffic in the default configuration


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27317 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-06-30 01:31:23 +00:00
jow
0874d00715 firewall: allow local redirection of ports
Allow a redirect like:

config redirect
        option src 'wan'
        option dest 'lan'
        option src_dport '22001'
        option dest_port '22'
        option proto 'tcp'

note the absence of the "dest_ip" field, meaning to terminate the connection on the firewall itself.

This patch makes three changes:

(1) moves the conntrack module into the conntrack package (but not any of the conntrack_* helpers).
(2) fixes a bug where the wrong table is used when the "dest_ip" field is absent.
(3) accepts incoming connections on the destination port on the input_ZONE table, but only for DNATted
    connections.

In the above example,

ssh -p 22 root@myrouter

would fail from the outside, but:

ssh -p 22001 root@myrouter

would succeed.  This is handy if:

(1) you want to avoid ssh probes on your router, or
(2) you want to redirect incoming connections on port 22 to some machine inside your firewall, but
    still want to allow firewall access from outside.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26617 3c298f89-4303-0410-b956-a3cf2f4a3e73
2011-04-12 20:03:59 +00:00
jow
b757185a71 [package] firewall: insert SNAT and DNAT rules according to the order of the configuration file (#8052)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23318 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-10-08 12:11:55 +00:00
jow
1efeaa35d1 [package] fireall:
- support negations for src_ip, dest_ip, src_dip options in rules and redirects
	- add NOTRACK target to rule sections, allows to define fine grained notrack rules


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23141 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-09-28 10:42:56 +00:00
jow
6ce96a49f3 [package] firewall: make invalid redirects and duplicate zones non-fatal, print a notice and discard them
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23080 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-09-16 11:47:35 +00:00
jow
c653713313 [package] firewall:
- simplify masquerade rule setup
	- remove various subshell invocations
	- speedup fw() by not relying on xargs and pipes
	- rework SNAT support - attach to dest zone, use src_dip/src_dport as snat source


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23024 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-09-11 20:04:34 +00:00
jow
614052f0c6 [package] firewall:
- fix possible endless loop when the family option is used for forwardings
	- only generate forwarding rules in SNAT redirect sections if src_dip is specified


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22938 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-09-05 20:17:23 +00:00
jow
750dead792 [package] firewall: introduce SNAT support for redirect sections
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22937 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-09-05 19:03:17 +00:00
jow
5fbf6ca9e6 [package] firewall: allow redirecting only destination port (#7197)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22227 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-07-16 06:03:15 +00:00
jow
e3060b618d [package] firewall:
- notrack support was broken in multiple ways, fix it
	- also consider a zone conntracked if any redirect references it (#7196)


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22215 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-07-15 22:01:48 +00:00
jow
90b818e4a5 [package] firewall: fix support for netranges in redirect and rule sections
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21640 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-30 23:49:47 +00:00
jow
24931686cd [package] firewall:
- fix ip6tables rules when icmp_type option is set
	- add "family" option to zones, forwardings, redirects and rules to selectively apply rules to iptables and/or ip6tables


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21508 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-19 21:35:23 +00:00
jow
e8be3016c9 [package] firewall:
- replace uci firewall with a modular dual stack implementation	developed by Malte S. Stretz
	- bump version to 2


git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21286 3c298f89-4303-0410-b956-a3cf2f4a3e73
2010-05-01 18:22:01 +00:00