Sponsored Content
Full Discussion: Open/close of ports
Special Forums IP Networking Open/close of ports Post 302520247 by balamv on Friday 6th of May 2011 08:53:04 AM
Old 05-06-2011
Open/close of ports

Hi,

I have read some forum theads about the open and close ports. some points are clear and it is not working on my machine or something am i missing?

I have commented out a port /etc/services, one application uses

then when i use the telnet <hostname[localhost]> <port_blocked> it shows connected..

ideally it should not come right?

Or Am i missing anything here?

Thanks,
Bala

---------- Post updated at 06:23 PM ---------- Previous update was at 05:51 PM ----------

This is the steps I followed

1. I stopped the service which is running on 3500 port
2. checked the netstat -an | grep 3500 ==> no outputs
3. checked the port in /etc/services, it is commented out
4. ran this command

su root -c "/etc/init.d/xinetd restart"

Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]


5. telnet mypc.com 3500
Trying 10.177.58.254...
telnet: connect to address 10.177.58.254: Connection refused
telnet: Unable to connect to remote host: Connection refused

This looks good, as expected i believe

6. Now I started the service on the port 3500
7. Service started successfully ?? How, it should not right?

8. Issue the telnet

telnet mypc.com 3500
Trying 10.177.58.254...
Connected to mypc.com (10.177.58.254).
Escape character is '^]'.

Now it is connected...
Am i somewhere wrong here?

I want to close the port.. but it is not working.

Pl assist me here.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

File status - open/close ??

Is there any commands in UNIX, like isopen(),isclose() to know whether a file has been opened for read/write purpose.? Thanks (3 Replies)
Discussion started by: Pal
3 Replies

2. UNIX for Dummies Questions & Answers

Should a UNIX daemon process close open fds?

I have a UNIX daemon process that's been started by a parent process, an application server. The behavior of this daemon process is to inherit and use the app server's file descriptors (ports/sockets). When I shutdown the app server, the daemon continues to run, because there may be other... (1 Reply)
Discussion started by: kunalashar
1 Replies

3. Shell Programming and Scripting

Check open ports every ...

Hello, i need a script (bash type maybe?..), which would check open ports on 127.0.0.1 and then compare open ports with "registered/allowed" port list and try to kill the program who uses unregistered ports. It would be great that script would be started lets say every 5 or 10 minutes. You see i... (2 Replies)
Discussion started by: MorchiuS
2 Replies

4. Solaris

close open files before remove

Hi I have a script to remove log files when it reaches %70 usage in order to descending order of dates. But sometimes it happens to remove open - being processes files , so makes them unlinked from the directors and results them disappeared. How can I solve this problem , simple scenario I... (9 Replies)
Discussion started by: xramm
9 Replies

5. UNIX for Advanced & Expert Users

Number of open files (Dir's) how to close?

I am having a client/server application which will download files from server. If server has directories, it will create directories/sub directories and then download files. In this process, I observed that number of open files are more than 400 (which is approxmately same as number of dir/subdir... (1 Reply)
Discussion started by: satyam90
1 Replies

6. Windows & DOS: Issues & Discussions

Can DOS close an open file?

I'm trying to setup a cron job for my brother that goes out to the web and retrieves an excel file and overwrites the existing copy on his desktop. The problem I'm facing is I have to kill the process (excel.exe) if the file is open while the batch file runs, otherwise, it will create another copy... (2 Replies)
Discussion started by: quattro20v
2 Replies

7. Solaris

file open/read/write/close/access by process

Hi want to know what file (descriptor+filename+socket) is being accessed by particular process on solaris. Purpose : while running perf. test, needs to find where is the bottleneck. We are providing concurrnet load for around 1 hr and needs to capture data related to file usage pattern... (1 Reply)
Discussion started by: raxitsheth
1 Replies

8. Solaris

Open ports in solaris 10

hi guys, may i know the exact steps to open a port in solaris.i have some rough idea - which is adding the port number in /etc/services. but i am not sure the correct conventions, steps or any other steps. kindly advise.thanks guys ! (1 Reply)
Discussion started by: cromohawk
1 Replies

9. Shell Programming and Scripting

Work with setsid to open a session and close it correctly

I would like to create the following script: run a python script with setsid python may or may not fail with exception check if all of the group processes were terminated correctly if not, kill the remaining processes How can I do that? Thanks a lot (3 Replies)
Discussion started by: ASF Studio
3 Replies

10. Shell Programming and Scripting

How to get value from a close and open parenthesis?

Hi Gurus, I have an input like the one below. What i wanted to achieved is to create a select statement based from that information INPUTInsert into table_name (col1,col2,col3,col4,col5,DATE1,DATE2,col6,col7,col8,col9,col10,col11) values (6752,14932156,24,'ALL','Staff',to_date('04/17/2017... (6 Replies)
Discussion started by: ernesto
6 Replies
dp(4)							     Kernel Interfaces Manual							     dp(4)

NAME
dp - dedicated ports file used by DDFA software and Telnet port identification feature DESCRIPTION
The file has two uses: The file is used by the Datacommunications and Terminal Controller Device File Access (DDFA) software to allow terminal server ports to be programmatically accessed from HP-UX applications in the same way as devices connected directly to the HP-UX sys- tem. It contains a one-line entry for each configured terminal server port. The file contains the information the DDFA software needs to set up and manage an outbound connection to a specified terminal server port. The file is parsed by the Dedicated Port Parser which spawns an Outbound Connection Daemon for each outbound connection specified in the file. The file is used by the HP-UX telnet daemon to identify the calling port and board of a telnet connection from an HP Datacommuni- cations and Terminal Controller (DTC). At connection time, the host negotiates the telnet environment option and the DTC replies with the port and board number of the connecting device. maps the port and board numbers to the well-known name for the device, which has previously been con- figured in the file. Datacommunications and Terminal Controller Device File Access For outbound connections, an entry should have the following format: The exact details of each field are given below. Telnet Port Identification To configure the file for using the Telnet port identification feature, the default file should be copied to a new file and the copy con- figured with the appropriate values for the incoming connections. The recommended procedure is to create a directory to hold the file and the modified port configuration files. An entry for this purpose should have the following format: The exact details of each field are given below. Configuration Information There are three ways to specify a terminal server port: o Explicitly specify its IP address. o Specify the node name or the IP address of the DTC then specify the board and port. o Specify the node name or the IP address of the terminal server and the TCP port service address of the port. Comments in the file can be appended by starting them with a character. Everything after the is ignored by the parser. Fields in the file are separated by space characters. See ddfa(7) for more information on how to configure the DDFA software. The fields of an entry of the file are as follows: dtc_name This field is the node name or the IP address of the terminal server being accessed or the IP address of the port on the terminal server. A node name must be defined in a name database. This field contains the terminal server port address with the parts separated by the character. It is not necessary to pad the values with leading zeros. The port address is not checked by but is checked by Valid values are 0 through 7 for board, and 0 through 31 for port (these restrictions do not apply if the TCP port service address is specified instead). If the dtc_name field explicitly defines the node name or the IP address of the terminal server port, the value in the field must be (use or If the field is of the form where n is a decimal number, n is assumed to be the TCP port service address and it is used when the connection is established. pseudonym This field is the absolute path of the device file known to the system and the end-user application. The device file name portion of the path name is limited to 14 characters. pc_file_path This field is the path to a port configuration file which contains the configuration information for the terminal server port. This field is mandatory for outbound connections as uses the presence of this field as its flag to spawn a daemon for the entry. log_level This field is the logging level for the particular and it determines the severity of messages sent to The logging levels (and how they relate to system logging levels) are as follows: Log only LOG_CRIT messages. Log only LOG_CRIT and LOG_ERR messages. Log only LOG_CRIT, LOG_ERR, and LOG_WARNING messages. Log all messages. It is optional and may only be specified for outbound connections. If it is omitted, the logging level is set to 1. EXAMPLES
The following examples illustrate file entry syntax. A printer is connected to port 1 of board 3 of a DTC with the IP address 11.234.87.123. The device attached to the port can be accessed with the HP-UX spooler by using the device file A printer is connected to a terminal server port with IP address 11.234.87.124. The field contains The device attached to the port can be accessed with the HP-UX spooler by using the device file A printer is connected to a port accessed with TCP port service address 5001 of a terminal server with the IP address 11.234.87.215. The device attached to the port can be accessed with the HP-UX spooler by using the device file A terminal is connected to port 1 of board 2 of a DTC with the IP address 11.234.87.215 and wishes to use Telnet port identification. WARNINGS
In order to ensure that commands (such as ps) display the correct device file name (that is, the pseudonym), all pseudonyms should be placed into the directory If pseudonyms are not specified for placement in this directory, the correct display of device file names with many commands is not guaranteed. In addition, in order to ensure that commands (such as and work correctly, each pseudonym must be unique in its first 17 characters (including the directory prefix If pseudonyms are not unique in their first 17 characters, the correct functioning of many commands is not guaranteed. FILES
SEE ALSO
dpp(1M), ocd(1M), ocdebug(1M), syslog(3C), pcf(4), ddfa(7). dp(4)
All times are GMT -4. The time now is 02:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy