Page 1 of 1

[Solved] How to prevent Internet access but allow local access?

Posted: 22. Dec 2016, 20:28
by Paddy Landau
I have an Ubuntu 14.04 server guest, running on an Ubuntu 16.04 host.

(I have a specific package that won't run on an updated system, which is why I need Ubuntu 14.04 on the server.)

At the moment, the guest has full Internet access. But, for security, I would like the guest server to be able to serve web pages to the host client, but to disallow access to the broader Internet.

So:
  • Host can access the Internet
  • Host can access the guest
  • Guest cannot access the Internet (it doesn't matter whether or not the guest can access the LAN)
Is there an easy way to set this up, or would it be complicated?

Re: How to prevent Internet access but allow local access?

Posted: 22. Dec 2016, 20:31
by socratis
VM Settings » Network » Adapter 1 » Attached to: Host-only Adapter.
Your guest will communicate with your host ONLY. More information, as always, in the User Manual: Ch. 6.2. Introduction to networking modes.

Re: How to prevent Internet access but allow local access?

Posted: 23. Dec 2016, 14:27
by Paddy Landau
socratis wrote:VM Settings » Network » Adapter 1 » Attached to: Host-only Adapter.
… More information, as always, in the User Manual: Ch. 6.2. Introduction to networking modes.
Thank you. Although I had found the manual page, for whatever reason I missed the bit about creating a host-only network in the Preferences. I also discovered that I had to change the /etc/hosts file.

It works now. Thank you for the advice!