0

i want to create my own server on virtual box.

i already add NAT and HOST-ONLY in virtual box.

and this is ip from virtual box host-only Adapter

ipv4 address = 192.168.56.1
netmask = 255.255.255.0

dhcp server

server address = 192.168.56.100
netmask = 255.255.255.0
lower address bound = 192.168.56.101
upper address bound = 192.168.56.254

and this ip in my ubuntu server. i setting ip from file /etc/netplan/50-cloud-init.yaml

network:
    ethernets:
        enp0s3:
            addresses: []
            dhcp4: true
        enp0s8:
            addresses: [192.168.56.2/24]
            dhcp4: no
    version: 2

i can access it in same computer, but i cant access from other computer.

0

If you need to access from other computer, why don't you just use bridged network? This is best suitable in your condition.

For host-only network, you can by no means access to other computers or access from other computers.

As for NAT, even host and guest cannot talk to each other without port forwarding.

Please refer the Official Virtual Network document and think again what are you trying to do.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.