Define different ports for one Service


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Define different ports for one Service
# 1  
Old 06-12-2006
Define different ports for one Service

Hi all,

Is it possible to define different ports for one services.
For examplehave I've a SMPP service on port 6000, and I want add
port 6001, and 6002, and 6003, for the SMPP service.

If it's possible? how can we proceed? is it just by modifiying the /etc/services file?

Thanks for your help,

Jeremy

Last edited by Jeremy3; 06-13-2006 at 11:37 AM..
# 2  
Old 06-13-2006
Any help will be highly appreciated.
# 3  
Old 06-14-2006
The /etc/services is simply a mapping by which various different programs use the getservbyname and getservbyport calls to map between the ports and names various services use.

You can have multiple lines but exactly what happens when you do so will depend on the implementation of getservbyname and getservbyport. On Solaris the first matching entry in the /etc/services file is used so multiple entries dont make much sense other than to provide a human readable record.
# 4  
Old 06-14-2006
Depends on the service... Usually there are parameters which allow you to do so...
For instance, whith sshd, you just need to create different config files and modify the line "Port" to the values you want. Then launch each server whit its corresponding config file...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Run one service after another service has finished - systemd

Hi all I would like to know how to run task2.service after task1.service has finished. task1.service has a timer (task1.timer), that makes it run every 5 minutes OnCalendar=*:0/5task2.service is basically a script, that has to work on the files created after task1 has finished. This is what I... (2 Replies)
Discussion started by: guilliber
2 Replies

2. Linux

Packages that monitor OS configs and service/ports?

I have several Redhat servers and workstations that I need to be able to monitor for any changes and be notified of any changes to the OS. The features I need to specifically monitor are: ports - opening of new ports that are not already in a whitelist services - any starting or attempts to start... (1 Reply)
Discussion started by: JCDinPGH
1 Replies

3. Programming

#define in c

Hi, I had a head file, looks like #define MIN_NUM 10 #define MAX_NUM 10 is there any way to get "MAX_NUM" from 10? thanks. peter (9 Replies)
Discussion started by: laopi
9 Replies

4. Programming

help with #define in C

if i do this in C #define NUM 1234512345 then how come i cant print it out using int main(int argc, char **argv) { printf("%d\n", NUM); return 0; } well the result is -1219236538, why isnt it 1234512345 ? (7 Replies)
Discussion started by: omega666
7 Replies

5. Programming

#define

Hello, I would like to conditionaly comment in my code source some fields from arrays. So I use the property ## from the #define definition. my code: ... #define slet /##* #define etsl *##/ ... const T_SVT_ADLL_A653_DESC A_DESC = { { slet qwerty etsl SLICING,... (3 Replies)
Discussion started by: cypleen
3 Replies
Login or Register to Ask a Question