Operating System - OpenVMS
1752798 Members
5746 Online
108789 Solutions
New Discussion юеВ

Telnet on another port + detect it

 
SOLVED
Go to solution
Bojan Nemec
Honored Contributor

Re: Telnet on another port + detect it

Willem,

Great description. Services on VMS works yust like you describe and are great to write task to task communication. They are very similar to DECnet objects.

I will try to describe a service with a RTTY flag, which works slightly different:
1. Access on port triggers TCPIP$INET to work - it will set up the BG device.
2. Creates a TN device connected to the BG device

From there just like normal terminal login

3. Execute LOGINOUT.EXE on the TN device - (which sets the user, process name, etc depending on the entered username)
4. Execute SYLOGIN.COM
5. Execute LOGIN.COM
6. Start the DCL prompt

As you can see the /FILE is not executed, but must be a valid and existing file because is checked when you do the ENABLE SERVICE (or startup). In my previous example I put the TCPIP$TELNET_RUN.COM for the /FILE, this is a rest of my testing, the /FILE name can be any existing file on the system.

You can try how it works yust copy/pasting the SET SERVICE command from my previous post in the TCPIP prompt. Then do the ENABLE SERVICE command. Omitt the SET CONFIGURATION which will write the anble service in the permanent database. Try a telnet yourhost 20023. Now you have a normal telnet session. If you do TELNET> SHOW DEVICE you will see that the local port is 20023 and not 23. You can also try my litle program from the previous post. When finished with testing you can remove the service with the TCPIP command SET NOSERVICE mytelnet.

Bojan
John Gillings
Honored Contributor

Re: Telnet on another port + detect it

Jan,

Since the TELNET client can do it, obviously a program can find the information you need. I've attached a rather ugly (but completely self contained) MACRO32 program that will find the port numbers for a given TNA device. It's a foreign command, so use:

$ TNBG 'F$GETJPI("","TT_PHYDEVNAM")

the program will define 4 local symbols

TNBG_ACCPORNAM - sanity check, and contains the remote host name
TNBG_BGDEVICE - the associated BG device name
TNBG_LOCAL_PORT - the port number on the local host
TNBG_REMOTE_PORT - the port number on the remote host

How to use, theory of operation, translation to favourite language, cleaning up, and ongoing support left as an exercise.

A crucible of informative mistakes
Willem Grooters
Honored Contributor

Re: Telnet on another port + detect it

Jan,

One day I've had to deal with a firewall 'specialist', who set this up by defining one DNS for reseolving names outside the firewall and one doing this for the inside. The outside-DNS kept the real IP address of a node, and the inside-DNS the gateway's address for the same one. Though this is feasable (if properly defined) I wouldn't recommend it for its clearness...
Of course, it went wrong someone else had to deal with it....

Willem
Willem Grooters
OpenVMS Developer & System Manager
Jan van den Ende
Honored Contributor

Re: Telnet on another port + detect it

So,

it took some time to get all required people activated at the same time (at several sites other priorities were raised).

Then there were some minor applic & authorisation details, but...

Hallelujah!!

Antonio, I noted you had only one entry in this stream, but you indeed HAD the jackpot!

Now our firewall on the inside has an alias IP address, and the plug-tables recognise when a user wants this applic. The session gets plugged to the alias, which in VMS is recognised as a "separate" source.
SYS$SYLOGIN recognises that, and the rest is old stuff.

Many thanks to all who put in effort to solve this for us!


Cheers.

Have one on me. (well, weekend coming, make that SOME)

Jan
Don't rust yours pelled jacker to fine doll missed aches.
Antoniov.
Honored Contributor

Re: Telnet on another port + detect it

Wow Jan,
I'm sorry but I'm very busy.
I disabled response e-mail but I've forgotten for this thread. If I called by e-mail I don't resist and I go into this forum.

Antonio Vigliotti
P.S.
Congratulation to Uwe.
Antonio Maria Vigliotti
Jan van den Ende
Honored Contributor

Re: Telnet on another port + detect it

Antonio, you did what I wanted: give me the chance to show our thanks with points!

Cheers.

Have one on me.

Jan
Don't rust yours pelled jacker to fine doll missed aches.