Sponsored Content
Full Discussion: ports and services
Top Forums UNIX for Dummies Questions & Answers ports and services Post 21630 by hassan2 on Monday 20th of May 2002 04:33:17 PM
Old 05-20-2002
you can turn off services and ports by editing the

/etc/services and
/etc/inetd.conf file and comment out "#" the required ports and services

Last edited by hassan2; 05-21-2002 at 05:27 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

inet services, open ports etc

When I scan my linux box for open ports, i have several of them, but they shouldn't be open. I removed the lines for them in /etc/services, and left just stuff like telnet, ssh, ftp. Why are they still open? I've restarted the network, and I've even restarted my box, but they still apear as open.... (4 Replies)
Discussion started by: sTorm
4 Replies

2. IP Networking

ports???

Ok, I've been working in the IT field for about 3 years now and I never fully understood the concept of ip ports. I just started a new job that uses Solaris and today it kinda clicked in my head and I want to know if I'm right or wrong. Does each ip address have multiple ports. because we... (4 Replies)
Discussion started by: eloquent99
4 Replies

3. IP Networking

Ports

What are some good sites that list all TPC/UDP ports? ~thanks (3 Replies)
Discussion started by: ireeneek
3 Replies

4. UNIX for Dummies Questions & Answers

Ports...

Hello UNIX people... This is my first foray into the UNIX world so go easy on me... I have a client who has hired me to do some work on his windows stuff, BUT it just so happens his UNIX server started giving him problems... He is running SCO Open Server 5.0.6 The TTY ports won't... (5 Replies)
Discussion started by: TechKnow
5 Replies

5. Solaris

ports

Hi, If for example i try to start tomcat in a solaris server and get errors related to address already in use, how can I know if this port is really used for another process? If someone can point any documentation it will be very helpfull. Thanks! :rolleyes: (9 Replies)
Discussion started by: ffpradella
9 Replies

6. UNIX for Dummies Questions & Answers

ports

When the netstat -an command is run on current unix machine, it seems that there's an excessive amount of ports established (roughly 600). How can I tell what each of these ports are being used for? (1 Reply)
Discussion started by: lastchance551
1 Replies

7. UNIX for Dummies Questions & Answers

open ports and services

just a quick question: a. whats the simplest command to check open port and the corresponding services? example: bash-2.05# netstat -an | grep LISTEN *.199 *.* 0 0 49152 0 LISTEN *.8989 *.* 0 0 49152 ... (1 Reply)
Discussion started by: lhareigh890
1 Replies

8. Red Hat

Restart of services if port no is changed in /etc/services in RHEL

I had a doubt if any services need to be restarted if port no in /etc/services in an RHEL setup is changed. For eg, the port no of 443 for SSL may need to be changed. I hope my query is clear whether any services need to be restarted if port no in /etc/services is changed. Please revert with... (10 Replies)
Discussion started by: RHCE
10 Replies

9. Shell Programming and Scripting

Script to Start services based on dependent services on other AIX machine

Hi, I just started working on a script. After my research, i found a command which can help me: AIM: To build a script which starts the services (Services 1) on server 1 automatically whenever its down. And it has a dependency on other service (Service 2) on Server 2. So my script has to... (4 Replies)
Discussion started by: draghun9
4 Replies

10. Linux

Ip_local_reserved_ports - How do i verify that kernel does not allow these ports to others services

Hi Team, I am using RHEL 7.3. I had added few port numbers in /proc/sys/net/ipv4/ip_local_reserved_ports. Now how do I verify that kernel does not allow to a service which requests random ports for its services. Thanks in Advance Hariharan Gopal (0 Replies)
Discussion started by: hariharan.gopal
0 Replies
getservent(3)						     Library Functions Manual						     getservent(3)

NAME
getservent, getservent_r - Get a services file entry from the /etc/services file. LIBRARY
Standard C Library (libc) SYNOPSIS
#include <netdb.h> struct servent *getservent(void); The following obsolete function is supported only for backward compatibility reasons. You should not use it in new designs. int getservent_r( struct servent *serv, struct servent_data *serv_data); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: getservent(): XNS5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
[Tru64 UNIX] For getservent_r() only, this points to the servent structure. The netdb.h header file defines the servent structure. [Tru64 UNIX] For getservent_r() only, this points to the servent_data structure. The netdb.h header file defines the servent_data struc- ture. DESCRIPTION
The getservent() (get service entry) function opens and reads the next line of either the local /etc/services file or the NIS distributed services file for the requested information. To determine which file or files to search, and in which order, the system uses the switches in the /etc/svc.conf file. An application program can use the getservent() function to retrieve information about network services and the protocol ports they use. The getservent() function returns a pointer to a servent structure, which contains fields for a line of information from the network ser- vices database file. The servent structure is defined in the netdb.h header file as follows: struct servent { char *s_name; /* official service name */ char **s_aliases; /* alias list */ int s_port; /* port # */ char *s_proto; /* protocol to use */ }; The network services database file remains open after a call by the getservent() function. Use the endservent() function to close the net- work services database file. Use the setservent() function to rewind. NOTES
The getservent() function returns a pointer to thread-specific data. Subsequent calls to this or a related function from the same thread overwrite this data. [Tru64 UNIX] The getservent_r() function is an obsolete reentrant version of the getservent() function and should not be used in new designs. Note that you must zero-fill the servent_data structure before its first access by the getservent_r() function. RETURN VALUES
Upon successful completion, the getservent() function returns a pointer to a servent structure. If it fails or reaches the end of the net- work services database file, it returns a null pointer. [Tru64 UNIX] Upon successful completion, the getservent_r() function stores the servent structure in the location pointed to by serv, and returns a value of 0 (zero). Upon failure, it returns a value of -1. ERRORS
Current industry standards do not define error values for the getservent() function. [Tru64 UNIX] If any of the following conditions occurs, the getservent_r() function sets errno to the corresponding value: The serv or serv_data parameter is invalid. The search failed. [Tru64 UNIX] In addition, if the function fails to open the file, it sets errno to indicate the cause of the failure. FILES
The DARPA Internet network service name database file. Each record in the file occupies a single line and has four fields: the official service name, the port number, the protocol name, and aliases. The database service selection configuration file. RELATED INFORMATION
Functions: getservbyport(3), getservbyname(3), endservent(3), setservent(3) Files: services(4), svc.conf(4) Networks: nis_intro(7) Standards: standards(5) delim off getservent(3)
All times are GMT -4. The time now is 07:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy