Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-17-2021, 01:31 PM
hanskl hanskl is offline
Registered User
 
Join Date: May 2021
Posts: 3
Looking for a script to automatically configure Local Port Forwarding Automatically

Hello,

I'm new to the forums and programing with VBS. So be gentle. I am looking to make it easier for users to connect via ssh to a server and setup an ssh tunnel to that same server.

I want to create a script that new users can run. This scrip would configure a new session if it does not exist and configure Local Port Forwarding for them. I have looked around but have not found any examples in the provided sample scripts. Can someone either point me in the right direction or get me started? Thanks!
Reply With Quote
  #2  
Old 05-17-2021, 02:05 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,635
Hi hanskl,

I am not sure we have any example scripts showing what you have described.

What version of SecureCRT are you using?

On what OS/platform?

What is the purpose of the port forward? Is it just a local port forward?

How would the listening port be determined? Just a random port between 1025 and 65535? Or limited by firewall configuration? Prompt the user?

Please explain in more detail about the interaction between user and script that you are expecting.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #3  
Old 05-18-2021, 08:57 AM
hanskl hanskl is offline
Registered User
 
Join Date: May 2021
Posts: 3
Hey Brenda,

Thanks for your reply.

I will try to answer your questions the best I can.

We are on SecureCRT 8.5.3 running on Windows 10.

Our server is running a VNC service on a port 5901 to 5909. The user chooses which port they would like to use. The user then would have to edit their SecureCRT session to forward that port to their local box. We like to do this for two reasons. One, so that the vnc traffic is encrypted. Second, we have a firewall between the server and client that allows only port 22. When the service is running and the port forwarded the user will start a vnc client on their workstation and point it to the local port that is created by the ssh tunnel.

I was hoping to have a script that would ask the user for a port number and create a session in SecuresCRT and configure the forwarded port. Our users are remote and not very tech savvy. I'm hoping to make the process as easy as I can for them.

I hope this clears things up.

Thanks,

Kent
Reply With Quote
  #4  
Old 05-18-2021, 10:06 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,635
Hi Kent,
Quote:
I hope this clears things up.
Somewhat, thanks!

Is upgrading a possibility? (I am not sure it's necessary, but we did add Python 3 support in v9.0.x. It may just be easier in Python.)

You should be able to check your upgrade eligibility here.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #5  
Old 05-19-2021, 07:00 AM
hanskl hanskl is offline
Registered User
 
Join Date: May 2021
Posts: 3
Hey Brenda,

Yes, I think upgrading to the latest version and do it in python if you think that would be easier.

Thanks,

Kent
Reply With Quote
  #6  
Old 05-19-2021, 08:43 AM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,635
Hi Kent,

Well, we don't write custom scripts so the choice is yours. It does sound like a fun project though so I am willing to help.

Would you list (in pseudocode) how you envision the interaction (with as much detail as possible)?

As in:
  • User presses button on button bar to run script
  • They are prompted for port and hostname
  • Session created with local port forward
  • etc.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
  #7  
Old 05-20-2021, 03:32 PM
bgagnon bgagnon is offline
VanDyke Technical Support
 
Join Date: Oct 2008
Posts: 4,635
Hi Kent,

Would you email support@vandyke.com and reference Attn Brenda - Forum Thread #14529? I have some ideas I wanted to discuss and email is just easier.
__________________
Thanks,
--Brenda

VanDyke Software
Technical Support
support@vandyke.com
(505) 332-5730
Reply With Quote
Reply

Tags
configure , port fowarding , script


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 05:19 AM.