LoginSignup
0
0

More than 5 years have passed since last update.

Firewalldで連番のportを開放する

Posted at

結論

firewalld.serviceのmanに以下のように書いてありました。

port="string"
The port string can be a single port number or a port range portid-portid or also empty to match a protocol only.

なので、port番号-port番号という指定方法で、連番のportを開放することができます。

# firewall-cmd --permanent --new-zone=renban
success
# firewall-cmd --permanent --zone=renban --add-port=10000-10100/udp
success
# cat /etc/firewalld/zones/renban.xml
<?xml version="1.0" encoding="utf-8"?>
<zone>
  <port protocol="udp" port="10000-10100"/>
</zone>

設定できました。servicesでも同様に指定できます。
終わり。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0