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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT CENTOS
portreserve
PORTRESERVE(1) TCP port reservation utility PORTRESERVE(1)
NAME
portreserve - reserve ports to prevent portmap mapping them
SYNOPSIS
portreserve
DESCRIPTION
The portreserve program aims to help services with well-known ports that lie in the bindresvport range. It prevents portmap (or other
programs using bindresvport) from occupying a real service's port by occupying it itself, until the real service tells it to release the
port (generally in its init script).
It is intended that portreserve runs from an initscript of its own, and services wishing to interact with it should use portrelease.
When the portreserve daemon is started, it examines the /etc/portreserve/ directory. Each file not containing "." or "~" in its name is
considered to be a service configuration file, and must contain a service name (as listed in /etc/services) or a port number. UDP services
may be specified by appending "/udp" to the service name, and TCP services by "/tcp". Several services may be specified, one per line.
For example, /etc/portreserve/cups might contain the string "ipp" or, equivalently, "ipp/tcp" and "ipp/udp" on separate lines.
For each service configuration file, a socket is created and bound to the appropriate port. A service wishing to bind to its port must
first run portrelease, which instructs portreserve to release the port associated with the service.
Once all the reserved ports have been released, the daemon exits.
FILES
/etc/portreserve/*
Service configuration files
/var/run/portreserve/socket
communication socket for portrelease
SEE ALSO
portrelease(1)
AUTHOR
Tim Waugh <twaugh@redhat.com>
Author.
portreserve 1 July 2008 PORTRESERVE(1)