0
1

More than 3 years have passed since last update.

VBoxでポートフォワーディングするときにはまった

Posted at

背景

VirtualBoxを業務でも使うそうなのでvagrantを使わずにApatchを入れて自分でポートフォワーディングしてアクセスしようとしたときにハマったのでメモ

結論

仮想OSのファイヤーウォールの設定ができていなかった。

解決法

VBox側でポートフォワーディングは設定済み。Apatchの設定でもServerNameをlocalhost:80に設定
次にOSのファイヤーウォールを設定する。

console
$ firewall-cmd --zone=public --add-service=http --permanent
$ firewall-cmd --reload
$ firewall-cmd --list-all

これで一覧にhttpが表示されていれば80ポートでの通信も可能になる。

所感

Vagrantを使わないと気付くことがあって面白い。今までAWSをいじっていたのが幸いしたのか、ファイヤーウォールの設定をしなくてはいけないというのが腹落ちして問題解決できた。

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