-
Notifications
You must be signed in to change notification settings - Fork 108
Add support for http_interface and http_bind_address #247
Description
Overview of the Issue
Neither of the mentioned config settings, http_interface or http_bind_address work quite as expected. As documented in this "feature request" issue: #245 the functionality of both of these configuration options seem to be broken in common but perhaps not the majority of cases.
My test/development VM has two interfaces with RFC1918 addresses. vmx0, the local ethernet interface, and tun0, a tunnel to the remote environment where vcenter is running.
http_bind_address: When I specify the address of tun0 this option correctly binds to the specified ipv4 address according to netstat -anl, however the message it prints stating HTTP server is working at a.b.c.d prints the address of vmx0, which is incorrect and unreachable by the remote network. That incorrect address is sent to the remote end for it to connect back to, which I determined with tcpdump.
http_interface : When this option is set to tun0 instead of setting the address as above, which I would prefer since the addresses are dynamic, Packer listens on all interfaces according to netstat -anl, but only on the ipv6 tcp socket. The address printed in the message is incorrect as above, showing the ipv4 address of vmx0 rather than the specified tun0.
Reproduction Steps
Attempt to use either of the above settings using the "second" (or higher) locally discovered interface.
Packer Version
1.8.5
Plugin Version and Builders
Please provide the plugin version.
n/a or unknown.
Please select the builder.
-
vsphere-iso - []
vsphere-clone
VMware vSphere Version
Please provide the VMware vSphere version.
6.7.0, 19997733
Guest Operating System
Ubuntu 20.04 LTS x64
Simplified Packer Buildfile
https://gist.github.com/alandsidel/8fdad97624aa34087a1d3b11d0c9b6f2