Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

[SOLVED] About set up Static IP on LAMP server

$
0
0
Hi all,

I followed below document to set up Static IP on a LAMP server running on Ubuntu 22.04 VM (VituralBox)

Setting Up Static IP Address on Ubuntu 22.04 LTS
https://itslinuxfoss.com/setting-up-...-ubuntu-22-04/
Method 1: Set up Static IP Address Using Command Line

Host - Ubuntu 22.04 desktop

The installation was not so straightforwards. Finally I figured out the problem encountered. Now Host can ping VM and VM can ping Host.

On Host browser running [VM_Fixed_IP] it starts "Apache2 Default Page" it works!

But I can't resolve
1) On Host
$ ip a
Code:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
      valid_lft forever preferred_lft forever
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 04:d9:f5:7d:0e:40 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.164/24 metric 100 brd 192.168.1.255 scope global dynamic enp4s0
      valid_lft 4330sec preferred_lft 4330sec
    inet6 fe80::6d9:f5ff:fe7d:e40/64 scope link
      valid_lft forever preferred_lft forever

Bridge Adapter
Name: enp4s0

2)
On VM
$ ip a
Code:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
      valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
      valid_lft forever preferred_lft forever
2: enp0s3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:00:27:56:96:e3 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.161/32 scope global noprefixroute enp0s3
      valid_lft forever preferred_lft forever
    inet 192.168.1.167/24 brd 192.168.1.255 scope global dynamic noprefixroute enp0s3
      valid_lft 4396sec preferred_lft 4396sec
    inet6 fe80::a98e:1f06:7c77:fce/64 scope link noprefixroute
      valid_lft forever preferred_lft forever

Bridge Adapter
Name: enp0s3

They are not the same.

On VM Manager
Settings -> Networks
Bridge Adapter
Name: [enp4s0 ]

Is it correct? Thanks

Regards

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>