(OLDER) <- More Stuff -> (NEWER) (NEWEST)
Printer Friendly Version



tcp/ip port address


What is this stuff?

If this isn't exactly what you wanted, please try our Search (there's a LOT of techy and non-techy stuff here about Linux, Unix, Mac OS X and just computers in general!):



From - Wed Mar 15 07:10:13 2000
Path: news.randori.com!hermes.visi.com!news-out.visi.com!cam-news-hub1.bbnplanet.com!news.gtei.net!newsfeed.mathworks.com!cyclone.swbell.net!news.pacbell.net.POSTED!not-for-mail
From: Jeff Liebermann <jeffl@comix.santa-cruz.ca.us>
Newsgroups: comp.unix.sco.misc
Subject: Re: Can I get the TCP port as well as the address for Telnet session
Organization: Committee to Maintain an Independent Xenix
Reply-To: jeffl@comix.santa-cruz.ca.us
Message-ID: <s7ftcs4jh1pmcb6km229crp0uthe54hlvh@4ax.com> 
References: <B4F421B196681D5389@mac-simon-h.colony.com> 
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 67
Date: Tue, 14 Mar 2000 14:51:28 -0800
NNTP-Posting-Host: 63.198.98.51
X-Complaints-To: abuse@pacbell.net
X-Trace: news.pacbell.net 953073902 63.198.98.51 (Tue, 14 Mar 2000 14:45:02 PST)
NNTP-Posting-Date: Tue, 14 Mar 2000 14:45:02 PST
Xref: news.randori.com comp.unix.sco.misc:56493
X-Mozilla-Status: 8011
X-Mozilla-Status2: 00000000

On Tue, 14 Mar 2000 17:04:49 +0000, simon at ccomms dot demon dot co
dot uk (Simon Hobson) wrote:

>I know I can get the client address for a login with 'who -xu' or 'who
>-mxu', does anyone know if it is possible to get the TCP port number of the
>client end ?
>
>The reason I ask is that we use a number of terminal servers (Bay Annex),
>and so a number of users will appear at one address. BUT it is possible to
>differentiate them by the port number the terminal server uses when
>connecting - eg a user attached to physical port 7 on these servers will
>connect from TCP port 10700 for the first session (then 10701, 10702 etc if
>they use multiple sessions).
>
>I have in mind writing a login script to restrict some users to only use a
>specified terminal and/or restrict some terminals to only certain users.
>Obviously I need to uniquely identify each terminal for this to work.
>
>System is Openserver 5.0.5a



3.2v5.0.5a?  Get some updates from:
        http://www.caldera.com/support/ftplists/osr5list.html
        http://www.caldera.com/support/toolbox/patch.html#osr505
        
Use SNMP for the purpose.  It works from the command line (which is
handy for a shell script) as well as works for your unspecified model
Bay Networks Annex terminal server.

Drivel:  Would you know the secret location of the old Synoptics and
Bay Networks web pages that Nortel conveniently buried when they
bought Bay Networks?

Anyway, read:
        http://www.cruzio.com/~jeffl/sco/snmp_install.txt
for how to install and run SNMP on OSR5.  You do not need Hostmib
installed for this.

Then run:
        snmpstat -nt | grep "ESTABLISHED"
which currently belches:

tcp    192.168.111.5.23       192.168.111.9.1146     ESTABLISHED
tcp    192.168.111.5.23       192.168.111.88.1076    ESTABLISHED  

showing two telnets (port 23) from 192.168.111.9 (my Windoze box) that
is coming from port 1146, and another telnet session from
192.168.111.88 (my RH6.1 box) on port 1076.



You can get the same information from:
        netstat -an | grep "ESTABLISHED"
tcp  0  4  192.168.111.5.23       192.168.111.9.1146     ESTABLISHED
tcp  0  0  192.168.111.5.23       192.168.111.88.1076    ESTABLISHED

I guess using:
        netstat -An | grep "ESTABLISHED"
looks somewhat cleaner.

Using SNMP, you should be able to get the same information directly
from the Annex terminal server.  I need the MIB to determine which
OID's to monitor.

If you want to monitor and graph traffic, user count, etc on your
Annex Terminal server, also see:
        http://ee-staff.ethz.ch/~oetiker/webtools/mrtg/mrtg.html
for MRTG.





Click here to add your comments



Don't miss responses! Subscribe to Comments by RSS or by Email

Click here to add your comments


If you want a picture to show with your comment, go get a Gravatar



/Bofcusm/310.html copyright 1997-2004 (various authors) All Rights Reserved

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

Jump to Comments



Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.

Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.

We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.



More:
       - OSR5
       - Bofcusm


Unix/Linux Consultants

Skills Tests

Guest Post Here











My Favorites

Change Congress