Skip to main content

temp-1

 /etc/services Entry Configuration User Guide

Add Services to /etc/services:

Description:

This section defines custom service entries to be added to the system’s /etc/services file. These entries map service names to port numbers and protocols (e.g., 1313/tcp), enabling applications to reference services by name instead of port.


✅ Used for internal service discovery, firewall rules, and application configurations. 


Section: Add Entries to /etc/services (add_etc_services)

Example JSON:

json



1

2

3

4

5

6

7

8

9

"add_etc_services": {

  "COMMENT": "Add the following services in /etc/services. (Space separating key/value)",

  "file_name": "/etc/services",

  "oracellsnr": "1313/tcp",

  "csawhttp": "2382/tcp",

  "csawrm": "4390/tcp",

  ...

  "ogg_17": "7817/tcp"

}

FIELD NAME

TYPE

DESCRIPTION

EXAMPLE VALUE

COMMENT

String

Instruction or note for users/admins

"Add the following services..."

file_name

String

Target file where entries should be added

"/etc/services"

Service Name

String

Logical name of the service (key)

"oracellsnr"

Port/Protocol

String

Port number and protocol (

tcp

or

udp

)

"1313/tcp"


✅ Note: Each key-value pair represents a service entry in the format:




1

<service_name>  <port/protocol>

Entries are separated by spaces (not newlines) when manually added, but typically appended one per line in the file. 


🧩 Full Sample JSON Configuration

json



1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

"add_etc_services": {

  "COMMENT": "Add the following services in /etc/services. (Space separating key/value)",

  "file_name": "/etc/services",

  "oracellsnr": "1313/tcp",

  "csawhttp": "2382/tcp",

  "csawrm": "4390/tcp",

  "csawds": "4509/tcp",

  "csawhttps": "4520/tcp",

  "csart": "4570/tcp",

  "csarh": "4580/tcp",

  "esm": "5600/tcp",

  "ogg_09": "7809/tcp",

  "ogg_10": "7810/tcp",

  "ogg_11": "7811/tcp",

  "ogg_12": "7812/tcp",

  "ogg_13": "7813/tcp",

  "ogg_14": "7814/tcp",

  "ogg_15": "7815/tcp",

  "ogg_16": "7816/tcp",

  "ogg_17": "7817/tcp"

}

💡 How to Manually Add These Entries

Use the following format when editing /etc/services:


bash



1

2

3

4

5

6

oracellsnr     1313/tcp

csawhttp       2382/tcp

csawrm         4390/tcp

csawds         4509/tcp

...

ogg_17         7817/tcp

Command (as root or via sudo):

bash



1

2

3

echo "oracellsnr     1313/tcp" >> /etc/services

echo "csawhttp       2382/tcp" >> /etc/services

# ... and so on

⚠️ Important: 


Always backup /etc/services before modifying:

bash



1

cp /etc/services /etc/services.bak

Avoid duplicates — check if the service already exists:

bash



1

grep "1313/tcp" /etc/services

🔐 Permissions Note

File: /etc/services

Required Privilege: Root access (sudo) to modify

Recommended Method: Use automation or configuration management tools (e.g., Ansible, Puppet)

Would you like me to now provide this entire guide as Confluence storage format markup (with {panel}, {code}, etc.) so you can copy-paste directly into your Confluence page? Just say yes!

Comments

Popular posts from this blog

How to Check Hardware Details on Linux:

  Whether you're troubleshooting hardware issues, planning an upgrade, or just curious about your system’s specifications, Linux provides a variety of commands to gather comprehensive hardware information. Here are some essential commands: 1.  Use lscpu to get detailed information about the CPU, including architecture, cores, threads, and CPU speeds. # lscpu                                                 2. The lshw command provides a complete overview of hardware configuration, including CPU, memory, storage, and network. You’ll likely need superuser privileges to run it. # sudo lshw                                                                               ...

testing

09052025 T-1 { "volume_groups" : { "vgroot" : { "vgsize" : "304G" , "fs_type" : "xfs" } } , "logical_volumes" : { "root" : { "lvroot" : { "vgname" : "vgroot" , "lvname" : "lvroot" , "lvsize" : "12G" , "mountpoint" : "/" , "purpose" : "root filesystem" , "disk" : 1 , "partition" : 2 } } , "swap" : { "lvswap" : { "vgname" : "vgroot" , "lvname" : "lvswap" , "lvsize" : "4G" , "mountpoint" : "NA" , "purpose" : "swap" , "disk" : 1 , "partit...

How Virtual Machines are Created in OpenStack: A Complete Backend Workflow:

When creating a Virtual Machine (VM) in OpenStack, several components work together in the backend to provision the instance. Here's a step-by-step explanation of how the process flows: 1. User Request Interface Used : The user initiates the VM creation through the Horizon Dashboard (web UI), the OpenStack CLI ( openstack server create ), or the OpenStack API. Request Information : The request includes parameters such as: VM name. Image (the operating system or custom image to boot from). Flavor (the compute, memory, and storage specifications). Network (which network the VM will be connected to). Security Groups (firewall rules). Key Pair (for SSH access). 2. API (Nova API) Component : Nova (Compute service). Process : The request is received by the Nova API , which validates the request (checks if the requested resources like the image, flavor, and network exist). If valid, the API creates an entry in the database for the new instance. Nova's Role : Nova is the core service r...