15
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[Vagrant]forwarded_portでIPアドレスが0.0.0.0になった時の解消法

Posted at

forwarded_portでIPアドレスが0.0.0.0になった時の解消法

Vagrant v1.9.3

config.vm.network "forwarded_port", guest: 22, host: 12210, id: "ssh"

Vagrantでポートフォワーディングの設定をする場合はforwarded_portを使いますが、以下のようなエラーが。

The requested address is not valid in its context. - connect(2) for "0.0.0.0" port 12220 (Errno::EADDRNOTAVAIL)

こんなときは、host_ipオプションをつけると大丈夫そうです。

config.vm.network "forwarded_port", guest: 22, host: 12210, host_ip:"127.0.0.1", id: "ssh"
15
11
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
15
11

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?