05-23-2002
TCP Listening Ports
Hello all,
Can someone instruct me on how to change the listening port for ftp ( or any tcp service) from 21 to another port number? Thanks in advance..
-AJ
10 More Discussions You Might Find Interesting
1. IP Networking
We are being setup with a client over their VPN to support them remotely. We are unable to access their VPN through our server, they said to look and make sure that the TCP ports are enabled for their security setup (ports are in the 4000 range).
How do you look for this and how do you enable a... (3 Replies)
Discussion started by: blacksheep
3 Replies
2. Shell Programming and Scripting
Hi,
Im programming a perl script which will act as a daemon listening on a tcp port (2323) and will take (<stdin>) from the client (im going to use telnet) and run the arguments from (<stdin>) against an program already on the server, which is used to list books in the library at uni.
So far... (1 Reply)
Discussion started by: emcb
1 Replies
3. UNIX for Dummies Questions & Answers
Just starting to work with unix, wondering if there is any good on-line documentation explaining TCP/UDP ports, how to use them, etc...
Thanks.... (1 Reply)
Discussion started by: eugene_mayo
1 Replies
4. IP Networking
Just wondering if anyone knows of any good on-line documentation on TCP/UDP Ports. Basically i want to know how to check if they are in use, learn how to close them, etc...
Thanks... (5 Replies)
Discussion started by: eugene_mayo
5 Replies
5. Programming
hello everyone. I tried searching for something related to this, but I figured it was time to ask my own question. I am experiencing these problems using Ubuntu 7.04
I am starting up a TCP listener/server and once connected, will act as a communication/control link with a program on another... (3 Replies)
Discussion started by: pjwhite
3 Replies
6. UNIX for Dummies Questions & Answers
I'm not sure if this is the right place for this post, but I'd be grateful if somebody could please help me. I'm trying to open ports 999, 1982 and 1983 but am not having much luck. I used
iptables -A INPUT -i eth0 -p tcp --sport 999 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A INPUT -i... (2 Replies)
Discussion started by: thehaapyappy
2 Replies
7. SCO
While in SCO Openserver 5.0.7, Sybase listened to /dev/inet/tcp, the same is not working in SCO Openserver 6. The Network card is however active and pinging fine. What can be the reason? What is the way out?
An early response will be appreciated.
Thank you
Regards
TCG (2 Replies)
Discussion started by: thecobolguy
2 Replies
8. Red Hat
How can I have ports that are listening without processes being associated with them?
root@ldv002 # netstat -ltnup
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0... (2 Replies)
Discussion started by: Padow
2 Replies
9. UNIX for Dummies Questions & Answers
Howdy Experts,
This is my first post here and I am posting because I have not been able to find an answer for this question.
How do you find out what process is listening on a given port? I do not have "lsof" available and how do we find this out without logging in as Root.
I know that this... (5 Replies)
Discussion started by: KingaKoopa
5 Replies
10. Ubuntu
I ran 'sudo netstat -ntpl' and got the following without PID
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:38977 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:34253 ... (3 Replies)
Discussion started by: tt77
3 Replies
LEARN ABOUT MOJAVE
net::servent5.18
Net::servent(3pm) Perl Programmers Reference Guide Net::servent(3pm)
NAME
Net::servent - by-name interface to Perl's built-in getserv*() functions
SYNOPSIS
use Net::servent;
$s = getservbyname(shift || 'ftp') || die "no service";
printf "port for %s is %s, aliases are %s
",
$s->name, $s->port, "@{$s->aliases}";
use Net::servent qw(:FIELDS);
getservbyname(shift || 'ftp') || die "no service";
print "port for $s_name is $s_port, aliases are @s_aliases
";
DESCRIPTION
This module's default exports override the core getservent(), getservbyname(), and getnetbyport() functions, replacing them with versions
that return "Net::servent" objects. They take default second arguments of "tcp". This object has methods that return the similarly named
structure field name from the C's servent structure from netdb.h; namely name, aliases, port, and proto. The aliases method returns an
array reference, the rest scalars.
You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that
this still overrides your core functions.) Access these fields as variables named with a preceding "s_". Thus, "$serv_obj->name()"
corresponds to $s_name if you import the fields. Array references are available as regular array variables, so for example "@{
$serv_obj->aliases()}" would be simply @s_aliases.
The getserv() function is a simple front-end that forwards a numeric argument to getservbyport(), and the rest to getservbyname().
To access this functionality without the core overrides, pass the "use" an empty import list, and then access function functions with their
full qualified names. On the other hand, the built-ins are still available via the "CORE::" pseudo-package.
EXAMPLES
use Net::servent qw(:FIELDS);
while (@ARGV) {
my ($service, $proto) = ((split m!/!, shift), 'tcp');
my $valet = getserv($service, $proto);
unless ($valet) {
warn "$0: No service: $service/$proto
"
next;
}
printf "service $service/$proto is port %d
", $valet->port;
print "alias are @s_aliases
" if @s_aliases;
}
NOTE
While this class is currently implemented using the Class::Struct module to build a struct-like class, you shouldn't rely upon this.
AUTHOR
Tom Christiansen
perl v5.18.2 2013-11-04 Net::servent(3pm)