2 listeners in a port


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting 2 listeners in a port
# 1  
Old 01-14-2010
Question 2 listeners in a port

Hi,

Is it possible to have 2 programs to listen in 1 port? the only job of that other program is to record or monitor down any request it recieves to that specific port.
Is that possible? Won't it cause any conflicts?
# 2  
Old 01-15-2010
Hello,

We don't know from which listener you are talking about (someone mentioned Oracle TNS listener in one of your previous thread). I assume that a listener is someone who ultimately performs the listen() syscall, i.e. acts as TCP server.

In this case, it is not possible to start two listeners on the same Internet address (i.e the pair IP : port): the second shall fail with a "Address Already in Use" error (actually, the bind fails).

HTH,
Loïc

Last edited by Loic Domaigne; 01-15-2010 at 12:38 PM..
# 3  
Old 01-15-2010
Hi.
Yes it is a TCP server. But it is listening to a port. port 17477. hmm... then it is not possible then huh..
Even though if the other one is like trying to catch the request only? i mean like ex.
If a request to that specific port 17477 was sent from a client the program will record that request but will not return anything while the other program will also recieve that request and will return something. Can it be done?
# 4  
Old 01-15-2010
This may help - Top 11 Packet Sniffers
# 5  
Old 01-15-2010
packet sniffers is of course a good idea. You may need however to interpret by hand the TCP stream if your running a proprietary protocol on top of TCP.

Another alternative is to create a proxy server that receives the packet at the well known server port 17477, do whatever action it needs to do with the packet (interpret the stream, logging etc) and forwards the packet to the real server that is running to another port, say 18488. The proxy forwards the answers from the real server back to the client. The client doesn't notice that he is not speaking to the real server.

It is nowadays easy to create such a proxy using modern scripting language, like Python for instance. I may have perhaps an example somewhere.

Cheers,
Loïc
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Bash script, find the next closed (not in use) port from some port range.

hi, i would like to create a bash script that check which port in my Linux server are closed (not in use) from a specific range, port range (3000-3010). the print output need to be only 1 port, and it will be nice if the output will be saved as a variable or in same file. my code is: ... (2 Replies)
Discussion started by: yossi
2 Replies

2. 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

3. Solaris

Cabling and adapters to communicate to service processor serial port from Windows PC with USB port.

Hello, I have an unloaded T5140 machine and want to access the ILOM for the first time and subsequently the network port after that., and then load Solaris 10 the final January 2011 build. The first part is what confuses me -the cabling. I am coming from a Windows machine (w/appropriate... (5 Replies)
Discussion started by: joboy
5 Replies

4. IP Networking

Tcp ip port open but no such process (merged: Release A Port)

i want to kill a tcp connection by killing its pid with netstat -an i got the tcp ip connection on port 5914 but when i type ps -a or ps-e there is not such process running on port 5914 is it possible that because i do not log on with proper user account i can not see that process running? (30 Replies)
Discussion started by: alinamadchian
30 Replies

5. Solaris

How to enable Serial port on ILOM, when Network Port is enabled in parallel

Hi Everyone, In my environment, I have few T5220. On the iLOM Management Card, I have both Network and Serial port are cabled, I don't have any issues while I try to connect using Network Management port, but when I try to connect the serial port for the same server which is actually connected... (3 Replies)
Discussion started by: bobby320
3 Replies

6. Shell Programming and Scripting

I need your help about port listeners

Hi guys, Im new on unix. but I need your help. I have a windows program that is querying data from unix computer through winsock, this unix computer is bought from Japan in 1995. All the guys who are in charge of this have already resigned. The problem is this winodws program is developed... (1 Reply)
Discussion started by: fif14344
1 Replies

7. Solaris

Enabling MQ Listeners

Hi I've been trying to change the services for MQ listeners using inetaconv and inetadm. The MQ was already installed and Im trying to change the QManager name. Ive creted the appropriate files (MQSeries-tcp.xml) and am now trying to enable MQSeries and then refresh the service: inetadm... (2 Replies)
Discussion started by: billy_mega
2 Replies

8. AIX

AIX listeners?

I have a file directory which I want to monitor - when a new file arrives I want to start a script. Are there any utilities which can do this (aside from DB2, Oracle, Websphere, etc). I just want a "simple" listener which will invoke a script. (2 Replies)
Discussion started by: edibob
2 Replies

9. IP Networking

RIP listeners

Hi! I have to find out if RIP listeners are enabled on some of UNIX servers. They are all running Tru64. Tnx! (1 Reply)
Discussion started by: veccinho
1 Replies
Login or Register to Ask a Question