OpenWrt Forum Archive

Topic: Syntax for specifiying multiple ports on redirects?

The content of this topic has been archived on 20 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all!

Does anyone know if there exist a syntax to specify multiple ports or ranges in a redirect config section?

Is anything like this possible?

config 'redirect'
    option 'src' 'wan'
    option 'src_dport' '6881-6684,14209,13899-13904'
    option 'proto' 'tcp'
    option 'dest_ip' '10.0.3.3'

The idea is that I would appreciate the abillity of adding a single config section for all the redirects necessary for an application on a single host (ip).

Any idea if this is possible or how to check where UCI parses this?

Thanx

It is not possible at the moment. You can specify ranges but not lists of ports or ranges (yet).

And now? wink

The discussion might have continued from here.