Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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

# Common inbound (ingress) UDP ports

Thanks for any help.

share|improve this question

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


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.