# Configuring CentOS AS VPS(Virtual Private Server)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691220222380/218bae5d-6425-4eac-abfe-9b3246c2a290.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691221787671/d540afdd-a8a2-4df9-9602-2f385e880cea.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691225558684/12469ba7-c8ff-410d-9bbf-32dd37a63607.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691225614152/abc3d37d-32fe-4e09-98b1-38792d6f8c1f.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691225643645/7883f9e6-a26b-480b-a562-6a35c46bf3b2.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691225712729/add5e6e6-6e3a-4c40-9c29-fe5e7eb9aeb8.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691229200233/1a59cde5-2ddb-4f73-a459-ac2aa7e45f20.png align="center")

### Cloninig of VM's

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691223856901/82986441-504c-4bd2-bafa-867515292987.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691223989303/5af9aa7f-bfe5-43ae-94b6-33fddf2a5607.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691224000807/009299ba-90a7-4e3e-8904-fdae9eeee45c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691224013030/e1d2cfce-57e1-4c39-85fb-245af5509a82.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691224071176/452ce53a-ee48-4602-a371-5a658b37a209.png align="center")

### Configuring The NAT Gateway

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691224133520/21efcd42-3ee4-46ba-b3d5-c5fc296a2ade.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691224153864/66031c19-f7a1-473a-9eaa-3ddcf702f0c4.png align="center")

```abap
ip addr show(to show the ip address in ens33)
```

Reboot the Systems.

Queries:Access to all the servers via ssh from the admin host and configure the hostname,create users with password.

```abap
ssh root@192.168.233.146
ip addr(verify the ip address)
hostnamectl set-hostname vps-server(set the host name)
exec bash
useradd goutam
passwd goutam

cat /etc/shadow | grep goutam
```

```abap
Configure for server 2
ssh root@192.168.233.147
ip addr(verify the ip address)
hostnamectl set-hostname vps-server(set the host name)
exec bash
useradd goutam
passwd goutam

cat /etc/shadow | grep goutam
```

### Configure static IPv$ Address to all the app servers and database servers.The Access host,(i.e. admin )

```abap
ip r
```

To Configure ip address in Linux

```abap
nmtui(network manager text user interface)
```

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691232939173/c25bf674-77e2-4ed5-9ff3-5c2c05b2af70.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691233016135/d22ba4d6-0d7d-46af-99a4-e9bd45adce20.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691233123212/b8681fbc-b467-489f-b597-439d5aa902d0.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691233200430/f3e293d6-1532-42a5-96cc-2cb02a573483.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691233265950/48533356-f52d-4d60-b1c8-1607a036b26c.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691233317225/3e5b9007-6d6b-48c0-8e0b-14d18018bd04.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691234988383/4f92f642-a8ff-417c-b255-57aeed11c2c7.png align="center")

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1691235035411/42ac1a01-45e9-4e96-86ba-d280a0d7346c.png align="center")

### Mapped the IP Address to Hostname

* host Command
    
* dig Command
    
* nslookup Command
    

$ sudo yum install bind-utils

```abap
su -l
vi /etc/hosts
```

add the following to the hosts file:

```abap
103.234.116.177 IN A test1.linuxreview.co.in
103.234.116.177 IN A mail.test1.linuxreview.co.in 
103.234.116.177 IN A webmail.test1.linuxreview.co.in
test1.linuxreview.co.in. IN MX 10 test1.linuxreview.co.in

ping 103.234.116.177 -t
```
