Is it possible to use ranges of ports? 22:24, or 22-24 in stanza?
0.0.0.0/0,tcp,8000:8010 : all ports 8000 through 8010 ?
I thought this worked at least under SLES 11sp4 but am now finding it now not to work? If this is a more general iptables question please let me know and I will inquire elsewhere, but since I’m using the included SLES config files I thought I would start here.
Is it possible to use ranges of ports? 22:24, or 22-24 in stanza?
0.0.0.0/0,tcp,8000:8010 : all ports 8000 through 8010 ?
I thought this worked at least under SLES 11sp4 but am now finding it
now not to work? If this is a more general iptables question please let
me know and I will inquire elsewhere, but since I’m using the included
SLES config files I thought I would start here.[/color]
Is it possible to use ranges of ports? 22:24, or 22-24[/color]
Not according to the documentation in /etc/sysconfig/SuSEfirewall2
[color=blue]
Which services should be accessible from ‘trusted’ hosts or nets?
Define trusted hosts or networks (doesn’t matter whether they are
internal or # external) and the services (tcp,udp,icmp) they are
allowed to use. This can # be used instead of FW_SERVICES_* for
further access restriction. Please note # that this is no replacement
for authentication since IP addresses can be # spoofed. Also note
that trusted hosts/nets are not allowed to ping the # firewall until
you also permit icmp. #
Format: space separated list of network[,protocol[,port]]
However, it is supported for other config settings:
[color=blue]
Format: space separated list of
for FW_MASQ_NETS, FW_NOMASQ_NETS,
And FW_SERVICES_… config settings that expect ports.
–
Kevin Boyle - Knowledge Partner
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below this post.
Thank you.
The colon does not appear to be working. The custom service is cool,
except that I see no easy way to limit those by IP or range?[/color]
After doing some more reading it seems
FW_TRUSTED_NETS=“0.0.0.0/0,tcp,8000:8010” should be valid so I wonder if
the issue is the 0.0.0.0/0 IP range and instead you should be using
FW_SERVICES_EXT_TCP=“8000:8010” instead?
Unless of course things have changed with SLES12 yet that still uses
SuSEfirewall2.
HTH.
Simon
SUSE Knowledge Partner
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.
The ‘iptables-save’ output above shows that those ports should be open. I
tested this by setting up netcat to listen for traffic on two ports in
that range (8008 and 8010) and then connected to it from netcat on another
server and it seemed to be just fine.
With that in mind, I do not know why, when allowing access from anywhere,
you would not just put these ranges into the Allowed Services section of
Yast, perhaps under Advanced, or define that services file Simon mentioned
and then add that to the list of allowed services on the External (or
whichever) zone, which would allow access to those ports from anything
assigned to that zone (by default everything unassigned is assigned to the
External zone).
–
Good luck.
If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.
If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.