Visit Our UNIX and Linux User Community


Changing SNMP port number


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Changing SNMP port number
# 8  
Old 11-21-2002
It is not just telnet. I don't believe that you can find any networking program supplied by HP or Sun that doesn't go through /etc/services. This includes both clients and servers.

I just downloaded the source code for httpd-2.0.43 from http://httpd.apache.org/download.cgi and I notice that httpd-2.0.43/srclib/apr/network_io/unix/sa_common.c line number 595 is certainly attempting to query /etc/services via a getservbyname() call. I'm not going to actually build it to see it works or not. I'll take your word that it doesn't. But that's a shame. I can only hope that its attempt to use gethostbyname() is more successful.

Any network programming book will tell you to use getservbyname()/gethostbyname() or getaddrinfo(). But the programs that play by the rules may be outnumbered by the programs that don't. Anyway I still think that /etc/services is where I would start to try to change a port number.
# 9  
Old 11-21-2002
FWIW:

Code:
www# vi /etc/services

www 81/tcp

Code:
www# killall -1 httpd

Code:
www# killall -1 httpd
www# netstat -an | grep :81
www#

Code:
www# netstat -an | grep :80
www# Too much output to post.

..... this has generally been my experience with server processes , BTW.

Just tried it with named (port 53) and it does not change....

However, tried it with sendmail (port 25) and it does change !!!

Very interesting.... Smilie
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #115
Difficulty: Easy
Linux is a continuation of the Unix design philosophy.
True or False?

10 More Discussions You Might Find Interesting

1. Solaris

How to find port number wwn of particular port on dual port HBA,?

please find the below o/p for your reference bash-3.00# fcinfo hba-port HBA Port WWN: 21000024ff295a34 OS Device Name: /dev/cfg/c2 Manufacturer: QLogic Corp. Model: 375-3356-02 Firmware Version: 05.03.02 FCode/BIOS Version: BIOS: 2.02; fcode: 2.01;... (3 Replies)
Discussion started by: sb200
3 Replies

2. Red Hat

Sending data from DELL OMSA SNMP and Custom SNMP MIB to same UDP port 161

Hi , Currently DELL OMSA SNMP sends data through default udp port 161.I want my custom SNMP MIB also to send data in the same udp port 161.Whether its possible.If yes where to configure .I tried starting my custom MIB in udp port 161,but it throws port already in use.Kindly guide. (1 Reply)
Discussion started by: prabakar4all
1 Replies

3. IP Networking

Sending data from DELL OMSA SNMP and Custom SNMP MIB to same UDP port 161

Hi , Currently DELL OMSA SNMP sends data through default udp port 161.I want my custom SNMP MIB also to send data in the same udp port 161.Whether its possible.If yes where to configure .I tried starting my custom MIB in udp port 161,but it throws port already in use.Kindly guide. (0 Replies)
Discussion started by: prabakar4all
0 Replies

4. Cybersecurity

Port Address Changing....

Is there a software solution to stop intruders from changing my port addresses? Causes IPmap to crash. Platform is OS/X Leopard. (1 Reply)
Discussion started by: aleatory
1 Replies

5. Shell Programming and Scripting

changing number in bash (number is in form of string)

I have a txt file as database. when i run my program what it does is it ask me for 3 name and stored in the file as name1:name2:name3:1 when u enter 3 name it add those in file as above format and add 1 at the end. I what i want is if i enter same names again it changes that 1 to 2 and so... (3 Replies)
Discussion started by: Learnerabc
3 Replies

6. Programming

Changing source port number of a TCP client packet

Hi all, I need to change the source port number of an outgoing TCP packet. First I have to bind the socket to a particular port(suppose 9001) but when I send the TCP packet I want to change the source port number lets say to 9002 still letting the socket to be bound to the same old port (9001).... (0 Replies)
Discussion started by: anuragrai134
0 Replies

7. UNIX for Dummies Questions & Answers

port number

hi all i want to connect a system, how can i know the port number of a system. (2 Replies)
Discussion started by: tukuna82
2 Replies

8. UNIX for Dummies Questions & Answers

Need to know port number

Hi expert, I wanted to know in which port my apache is running in solaris box thanks Shaan (1 Reply)
Discussion started by: shaan_dmp
1 Replies

9. Red Hat

changing snmp strings

If I change my SNMP strings from the default PUBLIC to something else. Does this take effect right away or do i have to restart snmpd or HUP it or...something...? this is RHEL 3 AS (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

10. Cybersecurity

get number of a port

Hello every one. I work in a LAN with many application server. Each one use a different port. What command permit to obtain the number of these port. thanks (2 Replies)
Discussion started by: hoang
2 Replies

Featured Tech Videos