0
0

More than 1 year has passed since last update.

【備忘録】IPTablesを使用したport開放

Posted at

IPTablesを使用してport開放を行う

ufwでのport開放ができなかったので、備忘録として書いておきます。

動作環境

・Ubuntu18.04LTS

実際にやったコマンド

今回は8080を開ける場合とします。

#8080の開放
$ iptables -I INPUT -p tcp -m tcp --dport 8080 -j ACCEPT

#設定の保存
$ sudo iptables-save -c

#reboot
$ reboot

これで適当にnmapかなんかで、

$ sudo nmap -sS -sU -Pn -p 1-65535 <IP Address>

と実行し、自分が開けたいportが開いているかを確認できます。

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