Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I am running into a problem trying to specify that webmin can only be accessed from my private IP. But I can get the port ranges to correctly work. I am using this in the allow_hosts.rules file.

tcp:in:d=10000:s={IP HIDDEN}
tcp:in:d=30000_35000:s={IP HIDDEN}
udp:in:d=30000_35000:s={IP HIDDEN}

The error I get when having those settings are

apf(21256): {trust} allow inbound tcp {IP HIDDEN} to port 10000
apf(21256): {trust} allow inbound tcp {IP HIDDEN} to port 30000-35000
iptables v1.4.7: invalid port/service `30000-35000' specified
Try `iptables -h' or 'iptables --help' for more information.
apf(21256): {trust} allow inbound udp 10.16.149.68 to port 3000-35000
iptables v1.4.7: invalid port/service `3000-35000' specified

The changes that make it work but allow from all IP's are.

# Common inbound (ingress) TCP ports
IG_TCP_CPORTS="10000,30000_35000"

# Common inbound (ingress) UDP ports
IG_UDP_CPORTS="30000_35000"

Thanks for any help.

share|improve this question

1 Answer 1

In my experience, I have been unable to get port ranges to work in the allow_hosts.rules file, only the apf.conf file. However, I have not been able to find any documentation that confirms this.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.