LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-26-2008, 03:08 AM   #1
answerme
Member
 
Registered: Apr 2008
Posts: 94

Rep: Reputation: 24
UDP port


How to configure UDP port in linux I meant how can find out UDP port
 
Old 05-26-2008, 03:39 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Can you provide a bit more info about what you are trying to do, because as it is, your question is a bit vague.
 
Old 05-26-2008, 03:42 AM   #3
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
To know which service use which udp port:
grep /udp /etc/services
To know which udp port is currently in use (which mean a local process is listening on this port):
netstat -au
To know which port is used on remote machine:
nmap -PU remote_machine
 
Old 05-26-2008, 03:44 AM   #4
pinniped
Senior Member
 
Registered: May 2008
Location: planet earth
Distribution: Debian
Posts: 1,732

Rep: Reputation: 50
Typical services can be found in a file like /etc/services (at least that's what it is on Debian). This should be the actual mapping for the system you're using. You can also go to iana.org and look up the assigned ports there.

Many services (such as mail), although assigned a port by IANA, can always be reconfigured to use a different port. You need to look at the configuration files of the various services to see what ports they will actually use. In some cases where the port may be hard-coded, you will need to look at the source for your particular service.

There are thousands of little-used servers which will open up ports at just about any address; in such cases you need to look at the configuration and the source.

You can use various network toolkits to see what ports are open for 'listening'.
 
Old 05-26-2008, 04:14 AM   #5
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
Quote:
Typical services can be found in a file like /etc/services (at least that's what it is on Debian)...
The likes of SUSE, Mandriva, Red Hat etc also have the services files in /etc/, so it seems like thats the standard location.
 
Old 05-26-2008, 05:31 AM   #6
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
/etc/services is present on AIX, HP-UX, BSD and many unices and unix-like systems. It's the standard way I believe (althgouth I don't know the iso number or the norm it fulfills).
Anyway, the question was indeed vague. 'configuring' UDP port doesn't really mean anything, and neither does 'finding out'. Maybe you could tell us what you are trying to do, or elaborate on what kind of configuration you are asking for?
 
Old 06-05-2008, 07:48 AM   #7
answerme
Member
 
Registered: Apr 2008
Posts: 94

Original Poster
Rep: Reputation: 24
I want to listen on the SIP UDP port 5060 in linux for the connectivity of 2 sip phones .I know UDP port is not listening
Can any one tell how i can configure this specific port
 
Old 06-05-2008, 08:20 AM   #8
Agrouf
Senior Member
 
Registered: Sep 2005
Location: France
Distribution: LFS
Posts: 1,591

Rep: Reputation: 79
A port isn't listening to anything. An application is listening on a port.
The UDP port is the phone number. The phone number isn't listening to anything. If nobody is home, nobody is listening to the phone. What you need is somebody answering the phone when the other one calls and that someone should talk the same language as the caller.
That somebody is an application. Ekiga, for instance, is an application that talks SIP and would gladly answer if someone called on port 5060 to talk SIP.
 
Old 06-05-2008, 08:45 AM   #9
indeliblestamp
Member
 
Registered: Feb 2006
Distribution: Fedora
Posts: 341
Blog Entries: 3

Rep: Reputation: 39
If you just want to see whether an application on your box is listening on port 5060, try something like this:
Code:
netstat -nap | grep 5060
If you want to see the actual messages being exchanged, use wireshark.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
telneting to a udp port. juanb Linux - Security 3 03-06-2013 02:30 PM
How to open a UDP port thiagarn Linux - Newbie 20 05-29-2008 10:00 AM
port 137 UDP kc3377 Linux - Security 4 04-07-2007 02:06 AM
udp port 1024 frgtn Linux - Security 2 03-27-2005 08:10 AM
closing port 68/udp? antik Linux - Security 1 09-26-2003 01:26 PM


All times are GMT -5. The time now is 08:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration