ipfw3: match multiple ports in a rule
Chuck Musser
cmusser at sonic.net
Thu Nov 24 00:52:39 PST 2016
> On Nov 23, 2016, at 11:58 PM, Freddie Cash <fjwcash at gmail.com> wrote:
>
> Separate ports with commas (22,80) to specify multiple ports in a rule. And you can do ranges too using dashes: 22,80,10000-10100.
Yes, the man page does describe and some of my attempts used it (the comma separated list, not the range). The specific results were:
ipfw3 add 101 set 1 allow tcp to 1.2.3.4 22,80
ipfw3: bad command `22,80'
That one's just invalid.
ipfw3 add 100 set 1 allow tcp to 1.2.3.4 dst-port 22,80
ipfw3 list 100
00100 allow tcp to 1.2.3.4 dst-port 22
It added the first port, not the second.
More information about the Users
mailing list