I've got a VirtualBox CentOS 7.0
Guest OS on a Windows Ten
Host for the purposes of development, and the port forwarding simply isn't working.
I have a NAT'd
network adapter (I can't use Bridged Adapters on this network) and to be fair I am much more comfortable with Bridged Adapters. But everything else works swimmingly. Except the ports 4567 and 9292 will not forward, while port 22 and port 80 work fine.
I have
22
,80
,4567
,9292
in VirtualBox on the NAT'd adapter.CentOS 7.0
completely (and restarted) then ruled that outlocalhost:4567
is perfect as is localhost:9292
SELINUX
on guest (for good measure)10.0.2.15:4567
/ 10.0.2.15:9292
in a vain attempt to get purchaseall the time I am ssh'd in on port 22
and port 80
works fine
Is this a traffic issue or a firewall issue, is there some sort of network filtering on the VirtualBox interface that's hidden from me?
I'd love some help.
NB: THE CAUSE IS SHOTGUN/RUBY NOT VirtualBox nor Firewalls nor port forwarding
@Matt fixed this... his link in the comments is correct, the fix to this is one of two things: (it's actually shotgun
running ruby in development mode that causes it)
CAUSE:
set :bind, 'localhost'
development mode. (link)SOLUTION:
set :bind, '0.0.0.0'
(can also be in the config.ru)Good news is if you're looking to make localhost:4567 work this is your ticket, add the line set :bind, '0.0.0.0'
to your config and you're good to go
ANNOYINGLY IF YOU RUN SHOTGUN THIS ISN'T GOING TO BE PICKED UP
Bad news is if you're looking to make localhost:9292 work shotgun does it's own thing here:
shotgun
won't LOOK at those ruby configs, it'll adopt it's own boot strategy, so you have to MAKE shotgun run in --host=0.0.0.0
mode: EG:# shotgun --server=thin --port=9292 --host=0.0.0.0 config.ru