Quantcast

how to add a new gateway to an existing network card to access virtual box

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to add a new gateway to an existing network card to access virtual box

robert rottermann

hi there

I have a ubuntu 16.04 running on a remote server, for which I have a fixed address assigned by the provider.

on this machine I have a virtual box virtual server running with a static address of 192.168.0.104

how do I add a gateway to access this address. it needs to be accessible only on the remote server. not from the internet.


thanks

robert


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to add a new gateway to an existing network card to access virtual box

Rashkae-2
On 17-03-10 12:22 AM, robert rottermann wrote:

> hi there
>
> I have a ubuntu 16.04 running on a remote server, for which I have a
> fixed address assigned by the provider.
>
> on this machine I have a virtual box virtual server running with a
> static address of 192.168.0.104
>
> how do I add a gateway to access this address. it needs to be accessible
> only on the remote server. not from the internet.
>
>
> thanks
>
> robert
>
>
>

I might be misinterpreting what you are trying to achieve, but assuming
your VirtualBox server can reach the internet through some kind of NAT,
you can do one of two things:

Forward the ports you want from the Internet gateway to the VirtualBox
server, but only accept connections from the static IP of the remote server.

Or 2.  Install OpenVPN Server on the remote server, and Openvpn client
on the VirtualBox server, and create a vpn between the two.





--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to add a new gateway to an existing network card to access virtual box

Karl Auer
In reply to this post by robert rottermann
On Fri, 2017-03-10 at 06:22 +0100, robert rottermann wrote:
> I have a ubuntu 16.04 running on a remote server, for which I have a 
> fixed address assigned by the provider.
>
> on this machine I have a virtual box virtual server running with a 
> static address of 192.168.0.104
>
> how do I add a gateway to access this address. it needs to be
> accessible  only on the remote server. not from the internet.

Just to double check: When logged in to the remote server from
somewhere on the Internet, you want to be able to make connections to
the virtual machine. You do NOT want the virtual machine to be directly
accessible over the Internet. Is that correct?

A use case for this would be a web server on the remote server that
needs to access a database running on the virtual machine. Nothing else
should be able to access the database, though.

If this is the arrangement you want, read the VirtualBox manual on
"host-only networking".

Otherwise, let us know what networking mode you are using now.

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: A52E F6B9 708B 51C4 85E6 1634 0571 ADF9 3C1C 6A3A
Old fingerprint: E00D 64ED 9C6A 8605 21E0 0ED0 EE64 2BEE CBCB C38B



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Xen
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to add a new gateway to an existing network card to access virtual box

Xen
In reply to this post by robert rottermann
robert rottermann schreef op 10-03-2017 6:22:

> hi there
>
> I have a ubuntu 16.04 running on a remote server, for which I have a
> fixed address assigned by the provider.
>
> on this machine I have a virtual box virtual server running with a
> static address of 192.168.0.104
>
> how do I add a gateway to access this address. it needs to be
> accessible only on the remote server. not from the internet.

In general though you don't need to give it a gateway, you just need to
be part of the same subnet.

In general in a running system you can simply do:

ip addr add 192.168.0.1/24 dev <whatever the virtual device is that
virtualbox has given you>

In general you can also simply add addresses to your main internet
device, whatever it is.

You don't actually need any "routing" the kernel will know to send
packages for a certain IP out a certain device. It doesn't require any
gateways; adding yourself to that subnet would automatically set up the
required routes.

To make it persistent depends on what network solution you are using, I
can't comment on that.

Regards.

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Loading...