質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.49%
Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

TCP

TCP(Transmission Control Protocol)とは、トランスポート層のプロトコルで、コネクション型のデータサービスです。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

Q&A

3回答

7480閲覧

Ubuntu 80/tcpのポート開放が出来ない

RiFu

総合スコア11

Linux

Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

TCP

TCP(Transmission Control Protocol)とは、トランスポート層のプロトコルで、コネクション型のデータサービスです。

Ubuntu

Ubuntuは、Debian GNU/Linuxを基盤としたフリーのオペレーティングシステムです。

0グッド

1クリップ

投稿2018/01/13 12:46

編集2018/01/13 15:41

Ubuntu17.04のポート開放ができません。使っているものはUFWというポート開放ソフトです。
使用しているウェブサーバーは、Nginxです。

やったこと

Shellにて以下のコマンドを実行しました。

ufw enable ufw allow 'Nginx Full' ufw reload
## # You should look at the following URL's in order to grasp a solid understanding # of Nginx configuration files in order to fully unleash the power of Nginx. # https://www.nginx.com/resources/wiki/start/ # https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/ # https://wiki.debian.org/Nginx/DirectoryStructure # # In most cases, administrators will remove this file from sites-enabled/ and # leave it as reference inside of sites-available where it will continue to be # updated by the nginx packaging team. # # This file will automatically load configuration files provided by other # applications, such as Drupal or Wordpress. These applications will be made # available underneath a path with that package name, such as /drupal8. # # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. ## # Default server configuration # server { listen 80 default_server; listen [::]:80 default_server; # SSL configuration # # listen 443 ssl default_server; # listen [::]:443 ssl default_server; # # Note: You should disable gzip for SSL traffic. # See: https://bugs.debian.org/773332 # # Read up on ssl_ciphers to ensure a secure configuration. # See: https://bugs.debian.org/765782 # # Self signed certs generated by the ssl-cert package # Don't use them in a production server! # # include snippets/snakeoil.conf; root /var/www/html; # Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html; server_name _; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } # pass PHP scripts to FastCGI server # #location ~ .php$ { # include snippets/fastcgi-php.conf; # # # With php-fpm (or other unix sockets): # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; # # With php-cgi (or other tcp sockets): # fastcgi_pass 127.0.0.1:9000; #} # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /.ht { # deny all; #} } # Virtual Host configuration for example.com # # You can move that to a different file under sites-available/ and symlink that # to sites-enabled/ to enable it. # #server { # listen 80; # listen [::]:80; # # server_name example.com; # # root /var/www/example.com; # index index.html; # # location / { # try_files $uri $uri/ =404; # } #}

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答3

0

もしさくらVPSで使用されているならチュートリアルにあるような設定をすればできますよ。
https://help.sakura.ad.jp/hc/ja/articles/206208121

投稿2018/09/14 10:04

退会済みユーザー

退会済みユーザー

総合スコア0

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

サーバーは何処に設置されていますか?
クラウド環境では、外部からサーバーのネットワークI/Fまでの経路に対してもポートを開放する必要があります。

投稿2018/01/13 20:55

編集2018/01/13 20:59
hichon

総合スコア5737

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

0

sudo ufw reloadは実行されましたか?
ufwの設定を変更した後は、このコマンドで設定内容を反映させる必要があります。

投稿2018/01/13 13:46

sublimer

総合スコア403

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

RiFu

2018/01/13 13:48

ごめんなさい!書き忘れていました。追加しておきます。 後sudo ufw reload はしました。
sublimer

2018/01/13 13:53

分かりました。 では、 sudo ufw status このコマンドを実行したとき、表示されるメッセージの中に Nginx Full ALLOW Anywhere は含まれていますか?
RiFu

2018/01/13 14:38

はい、含まれています。
sublimer

2018/01/13 14:41

sudo ufw allow 80/tcp こちらのコマンドだとどうでしょうか? tcpの80番ポートを開放するコマンドです。
RiFu

2018/01/13 15:42

前と同様変化なしです。
sublimer

2018/01/14 07:13

そうですか… これを最初に確認しておくべきだったのですが、ポートが空いているかどうかはどのように確認していますか? ブラウザでアクセスしているのでしょうか? もしそうであれば、ブラウザにはエラーメッセージなど、何か表示されていますか?
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだベストアンサーが選ばれていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.49%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問