LoginSignup
0
0

More than 3 years have passed since last update.

firewalldで独自サービスを追加する方法

Last updated at Posted at 2019-12-29

softether vpnでポート443/TCPと5555/TCPと992/TCPを開ける必要があるのでfiwalldの設定ファイルを書いてみる。

ファイル名を softether.xml で作成して編集する。

<?xml version="1.0" encoding="utf-8"?>
<service>
  <short>SoftEther VPN</short>
  <description>SoftEther VPN Server</description>
  <port protocol="tcp" port="443"/>
  <port protocol="tcp" port="992"/>
  <port protocol="tcp" port="5555"/>
</service>

このファイルを特定のパスへコピーする。

cp softether.xml /etc/firewalld/services/

systemdへサービスを追加する。 --permanent をつけ忘れると永続化されない。

firewall-cmd --add-service=softether --permanent

ファイルを配置したらfirewalldを再読み込みさせる。

firewall-cmd --reload

補足:既存のサービスのポートを変更

FirewalldでSSHポートを変更

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