Accessing a service listening on localhost inside Ubuntu 16.04 Vagrant box from windows 10 host machine

141 views
Skip to first unread message

Surendra Singh Khatana

unread,
Jul 20, 2019, 3:49:40 AM7/20/19
to Vagrant
Hi, 
I have installed a packaged software (Gluu : https://gluu.org/docs/) with in a Ubuntu Vagrant box. 
It has an Ldap (openDJ) which is listening only on the localhost interface on port 1636.

Now all I want to do is to access ldap service from my windows machine using any Ldap tools (for example : Apache DS Studio etc)..
I have tried standard way of forwarding ports but that hasn't helped. How to connect to the service listening on localhost interface within vagrant from host machine.

root@localhost:/home/vagrant# sudo netstat -lntup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      1361/sshd
tcp6       0      0 :::80                   :::*                    LISTEN      2544/apache2
tcp6       0      0 127.0.0.1:8081          :::*                    LISTEN      2643/java
tcp6       0      0 127.0.0.1:8082          :::*                    LISTEN      2901/java
tcp6       0      0 127.0.0.1:8085          :::*                    LISTEN      3040/java
tcp6       0      0 :::22                   :::*                    LISTEN      1361/sshd
tcp6       0      0 :::8090                 :::*                    LISTEN      3130/node
tcp6       0      0 :::443                  :::*                    LISTEN      2544/apache2
tcp6       0      0 127.0.0.1:4444          :::*                    LISTEN      1981/java
tcp6       0      0 127.0.0.1:1636          :::*                    LISTEN      1981/java
udp        0      0 0.0.0.0:68              0.0.0.0:*                           916/dhclient
udp        0      0 192.168.33.75:123       0.0.0.0:*                           1431/ntpd
udp        0      0 10.0.2.15:123           0.0.0.0:*                           1431/ntpd
udp        0      0 127.0.0.1:123           0.0.0.0:*                           1431/ntpd
udp        0      0 0.0.0.0:123             0.0.0.0:*                           1431/ntpd
udp6       0      0 fe80::a00:27ff:feef:123 :::*                                1431/ntpd
udp6       0      0 fe80::20:67ff:fe8c::123 :::*                                1431/ntpd
udp6       0      0 ::1:123                 :::*                                1431/ntpd
udp6       0      0 :::123                  :::*                                1431/ntpd

I have tried following configuration in Vagrant file but it hasn't helped.
config.vm.network "private_network", ip: "192.168.33.75"

also , tried forwarding the ports :
config.vm.network "forwarded_port", guest: 1636, host: 1636

Any help is highly appreciated !

Regards
Suren
 

Alvaro Miranda Aguilera

unread,
Jul 20, 2019, 12:27:06 PM7/20/19
to vagra...@googlegroups.com
the issue is on the service only listening to 127.0.0.1:1636

you will have to update to bind to all interfaces. check the documentation of the product

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
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 vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/f5ee08fe-588e-4768-a6ff-ede408231bc4%40googlegroups.com.


--
Alvaro

Surendra Singh Khatana

unread,
Jul 20, 2019, 12:49:33 PM7/20/19
to Vagrant
Hi,
Yes , the issue is only for the service listening to 127.0.0.1:1636 . The product documentation doesn't have any specific guidelines regarding vagrant.
Are there any solution from vagrant point of view which can be used here . 
To unsubscribe from this group and stop receiving emails from it, send an email to vagra...@googlegroups.com.


--
Alvaro

Serguei Kouzmine

unread,
Jul 23, 2019, 8:38:06 PM7/23/19
to Vagrant
@surendra Forerock configuration documentaion is indeed not easily found - you can try searching for

opendj ds-cfg-listen-address: 0.0.0.0

Vagrant alone will not help 
Reply all
Reply to author
Forward
0 new messages