try with firewall list rules: iptables -L
clean all the rules: iptables -F Also, paste the output of vagrant up, maybe the host is already using port 30000 .. that should be an error/warning on the output of vagrant up Alvaro. On Sat, Mar 7, 2015 at 1:00 PM, Ryan Moore <[email protected]> wrote: > Greetings, > > I am having a similar problem...I have a rails server running on my vagrant > machine serving on port 3000, as shown by the output from netstat. > > tcp 0 0 127.0.0.1:3000 0.0.0.0:* LISTEN > 1000 15938 5632/ruby > > This works fine on the VM... I can run Firefox on the VM and forward it > through X11 and view the website on my host machine that way (through the > x11 windowed Firefox), but when I try to go to 127.0.0.1:3000 or > 127.0.0.1:30000 on my host machine's web browser, or with curl, it doesn't > work. > > Here is the bit from my Vagrantfile > > config.vm.network :forwarded_port, guest: 3000, host: 30000 > config.vm.network :private_network, type: "dhcp" > > > Any suggestions? > > Thanks, > Ryan > > On Sunday, January 25, 2015 at 3:35:33 PM UTC-5, Alvaro Miranda Aguilera > wrote: >> >> My suggestion would be set a private nic on vagrant, and then change the >> program to bind to that specific IP, will be easier. >> >> https://docs.vagrantup.com/v2/networking/private_network.html >> >> Keep going, and don't give up! >> >> Alvaro. >> >> On Mon, Jan 26, 2015 at 2:55 AM, Charles <[email protected]> wrote: >>> >>> Alvaro: >>> >>> Thanks you for pointing me in the right direction! >>> >>> Indeed, the results of netstat showed a difference between apache and my >>> simple go server: >>> >>> tcp 0 0 127.0.0.1:3000 0.0.0.0:* >>> LISTEN 1406/httpbuddy >>> >>> vs. >>> >>> tcp 0 0 0.0.0.0:80 0.0.0.0:* >>> LISTEN - >>> >>> So it looks like I need to get my go server to listen on 0.0.0.0, which >>> would let all interfaces access it, vs. loopback which is 127.0.0.1? Not >>> sure how to do that yet, but I'll figure it out. >>> BTW, iptables is not running on the virtual machine. >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Vagrant" group. >>> To unsubscribe from this group and stop receiving emails from it, send an >>> email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >> >> > -- > You received this message because you are subscribed to the Google Groups > "Vagrant" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Vagrant" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
