1

I have Ubuntu Server 10.04.4 LTS running in the VirtualBox. Network is set as up Bridged Adapter, so I can access my server from other devices in the local network.

But, I would like access to VirtualBox server from devices on different network too. I have played a bit with opening ports on the router and DynamicDNS. The problem is I can't see my Server's IP in my router (although I can access it) and don't know hot to figure out on which port it is. Am I doing something wrong?

1 Answer 1

0

You must to configure ip static in your server. Open with nano or other text edit / etc / network / interfaces and add this lines to configure

iface eth0 inet static
    address 192.168.1.1 
    netmask 255.255.255.0 
    network 192.168.1.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
    dns-nameservers 192.168.1.1 8.8.8.8

Later enter in your router, depending the router brand, you must to search NAT seccion, Virtual Server or Port Forwarding, configure these options:

-name service: name of the application the service will use

-protocol: UDP, TCP or BOTH

-extern port: the port where you connect with other network

-internal port: some routers allow us to forward internal ports, that is, if we only fill in the external port, the internal port will be exactly the same, but we can change this, for this reason, this is optional.

-Intern IP : your Ubuntu IP you configure in /etc/network/interfaces

-Origin IP: in some routers you can configure the source IP only to allow access to this IP, for security, if you don't have the option on your router, configure on your server with iptables. If you don't configure this, anyone can connect to your server.

Now you can connect with your server with your router IP and the port you configured

4
  • First of all thank on your comment.
    – River Town
    Commented Apr 8, 2020 at 11:20
  • Ubuntu 10.04 uses netplan for network configuration, and this is how it is configured currently: >network: > ethernets: > enp0s3: > dhcp4: false > addresses: [192.168.5.20/24] > gateway4: 192.168.5.1 > nameservers: > addresses: [8.8.4.4,8.8.8.8] > version: 2 This my routers NAT Virutal Server config. I tried to enter some unassigned ports, but no luck connecting (WAN IP:PORT No.) !Valid XHTML
    – River Town
    Commented Apr 8, 2020 at 12:00
  • Sorry, I supposed that in Ubuntu 10 the network configuration would be done as in previous versions to now. You open ports in the router settings and it doesn't work? What service do you want to use on your server to connect? In your Lan, does it work? Do you have a correct iptables policy that admits external connections?
    – mourazo
    Commented Apr 8, 2020 at 15:07
  • Which protocol do you use to access your VM? Is it VNC+ssh, something else?
    – user1019780
    Commented Apr 9, 2020 at 8:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .