Cant acces webmin outside the virtual machine running it (VirtualBox -> Ubuntu-Server 16.04 -> LAMP -> Webmin)

-1

I have setup a virtual machine running Ubuntu 16.04 with virtualbox. I then installed LAMP and Webmin. On the virtual machine i can access http://localhost:10000 & http://1.0.2.15:00000 & http://servername:00000 However i can't access any of these including http://externalIP:00000 from my W10 installation which is running the virtualbox.

  • Things i tried: disabling SSL and setup bridged mode in Virtualbox.
  • I am following this guide
  • I am running behind a Sitecom WLR-6100 router.
  • The Ubuntu server has access to internet.

My goal is to administrate Webmin from my W10 installation and host websites with Virtualmin publically.

This is the first time for me setting up a server so help is really appreciated.

Bram z

Posted 2016-09-09T02:43:54.497

Reputation: 147

Answers

0

Can you access to this machine through ssh to the external IP? First check if is a network problem.

Are your running a firewall such as iptables? with "sudo ufw disable" you can disable it.

Roberto Sainz Aja Sainz Maza

Posted 2016-09-09T02:43:54.497

Reputation: 1

When i disable the firewall i can access webmin and websites (super excited about getting that to work :D ) however when i enable ufw i can no longer access it webmin and neither the websites. I am also only able to connect to websites from my mobile phone internet. Local machines running on the same router can't connect. I would like to know what firewall rules should be setup and if there's a workaround for accessing websites on the same network. – Bram z – 2016-09-09T15:23:03.537

Using webmin you have severals modules that you can use it and manage your firewall without use console. You can install a GUI using "sudo apt-get install gufw" and configure your rules. If you prefer the console perhaps this command can be useful "sudo ufw allow 10000" another alternative is "sudo iptables -A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT" for more information: http://www.webmin.com/firewall.html and https://help.ubuntu.com/community/UFW web pages.

– Roberto Sainz Aja Sainz Maza – 2016-09-09T19:56:16.370

I got Webmin to work with the UFW enabled. Using these commands, however accessing the websites is still not working with UFW.

– Bram z – 2016-09-09T20:22:31.140

I suppose that your web sites are running on apache on a standard port (default port 80) you want another rule in your firewall that let you have access to your http service. Could you try "sudo ufw allow http" or "sudo ufw allow 80" if you use https is the same for port 443. You can check /var/log/ufw.log in order to see that port are being blocked. – Roberto Sainz Aja Sainz Maza – 2016-09-09T20:38:16.070

Are there any security risks for allowing ports both TCP and UDP? Managed to get access when allowing all common webserver ports using ufw allow ##: FTP: 21 SSH: 22 Telnet: 23 SMTP: 25 DNS: 53 HTTP: 80 POP3: 110 IMAP: 143 – Bram z – 2016-09-09T21:16:06.640

You always must open only the necessary, especially when your environment is critical . http and https both are TCP – Roberto Sainz Aja Sainz Maza – 2016-09-09T23:12:01.967

0

I can now connect from my W10 installation to the Ubuntu Virtual Machine (using the server ip which is similar to my W10 ip). In Virtualbox i set all network adapters off and only 1 enabled as Bridged Adapter following this guide

Bram z

Posted 2016-09-09T02:43:54.497

Reputation: 147

0

Allow the Webmin default port via a firewall as follows:

sudo ufw allow 10000

Joe

Posted 2016-09-09T02:43:54.497

Reputation: 1