08-27-2007
dears,
I tried to use nc -l -p 21 -e /program
but this well success for only one time connection after that the nc will be closed???? how can I make the nc running continously ...I need to make the listening for the specified port continous?????
any help????
9 More Discussions You Might Find Interesting
1. AIX
Hi Guys,
i am trying to open a port in AIX.
but i am not able to get the command for this. AIX is not having the iptables file present.
So please any body can tell me how to open a port in AIX...
Thanks
sanju (2 Replies)
Discussion started by: sanju_d1231
2 Replies
2. IP Networking
Hi. I ran nmap on my server, and I get the following:
Starting Nmap 4.76 ( http://nmap.org ) at 2009-03-19 16:33 EDT
Interesting ports on -------- (-----):
Not shown: 997 closed ports
PORT STATE SERVICE
22/tcp open ssh
80/tcp open http
6881/tcp open bittorrent-tracker
The... (0 Replies)
Discussion started by: Rledley
0 Replies
3. Solaris
Dear members,
My release is open Solaris b103
1- How to know the opening port in my system
2- How to open a specific port like port number 53
3- How to closed the specific port like port number 53
Your feedback highly appreciated (10 Replies)
Discussion started by: dellroxy
10 Replies
4. Solaris
Hi All,
Can anyone let me know that how to open a specific port in Solaris 10. I just wanted to know if there are some certain commands to open a port (like ftp, telnet).
It would be also better if someone can tell me if there is another firewall service in Solaris 10 except ipfilter.
... (6 Replies)
Discussion started by: naw_deepak
6 Replies
5. Solaris
Hi All,
I am installing Infosphere (ETL tool) on solaris 10.
One of the requirement is to open multiple ports for different apps that will be installed. I ran netstat -n | grep 9080 (,etc) but that did not return anything.
I have attached the requirement. Can anyone guide me about how to... (3 Replies)
Discussion started by: sumeet
3 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I would like to open a specific port for use with a bespoke application.
Before everyone points me to other threads - I read a few but couldn't find any specific to my problem.
Iptables / firewall is disabled
SELinux is also disabled
I would just like to assign this port to this... (0 Replies)
Discussion started by: mcclunyboy
0 Replies
7. Red Hat
Hi,
What iptables command do I need to run in order to open up the following port for incomming traffic on the following server:
# telnet 127.0.0.1 1521
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host: Connection... (3 Replies)
Discussion started by: Duffs22
3 Replies
8. IP Networking
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
9. HP-UX
Hello Experts,
I want to open the port 443 on my HP-UX system.
can you please help ?
Thanks in advance. (1 Reply)
Discussion started by: purushottamaher
1 Replies
RTIME(3) Linux Programmer's Manual RTIME(3)
NAME
rtime - get time from a remote machine
SYNOPSIS
#include <rpc/des_crypt.h>
int rtime(struct sockaddr_in *addrp, struct rpc_timeval *timep,
struct rpc_timeval *timeout);
DESCRIPTION
This function uses the Time Server Protocol as described in RFC 868 to obtain the time from a remote machine.
The Time Server Protocol gives the time in seconds since 00:00:00 UTC, 1 Jan 1900, and this function subtracts the appropriate constant in
order to convert the result to seconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
When timeout is non-NULL, the udp/time socket (port 37) is used. Otherwise, the tcp/time socket (port 37) is used.
RETURN VALUE
On success, 0 is returned, and the obtained 32-bit time value is stored in timep->tv_sec. In case of error -1 is returned, and errno is
set appropriately.
ERRORS
All errors for underlying functions (sendto(2), poll(2), recvfrom(2), connect(2), read(2)) can occur. Moreover:
EIO The number of returned bytes is not 4.
ETIMEDOUT
The waiting time as defined in timeout has expired.
NOTES
Only IPv4 is supported.
Some in.timed versions only support TCP. Try the example program with use_tcp set to 1.
Libc5 uses the prototype
int rtime(struct sockaddr_in *, struct timeval *, struct timeval *);
and requires <sys/time.h> instead of <rpc/auth_des.h>.
BUGS
rtime() in glibc 2.2.5 and earlier does not work properly on 64-bit machines.
EXAMPLE
This example requires that port 37 is up and open. You may check that the time entry within /etc/inetd.conf is not commented out.
The program connects to a computer called "linux". Using "localhost" does not work. The result is the localtime of the computer "linux".
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <time.h>
#include <rpc/auth_des.h>
#include <netdb.h>
int use_tcp = 0;
char *servername = "linux";
int
main(void)
{
struct sockaddr_in name;
struct rpc_timeval time1 = {0,0};
struct rpc_timeval timeout = {1,0};
struct hostent *hent;
int ret;
memset(&name, 0, sizeof(name));
sethostent(1);
hent = gethostbyname(servername);
memcpy(&name.sin_addr, hent->h_addr, hent->h_length);
ret = rtime(&name, &time1, use_tcp ? NULL : &timeout);
if (ret < 0)
perror("rtime error");
else {
time_t t = time1.tv_sec;
printf("%s
", ctime(&t));
}
exit(EXIT_SUCCESS);
}
SEE ALSO
ntpdate(1), inetd(8)
COLOPHON
This page is part of release 3.44 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
GNU
2012-08-03 RTIME(3)