3

I'm in a computer science program at my university (Ryerson) and I'm learning perl programming.

The way we're learning is by hosting perl scripts on our university's server and doing stuff with them.

I'm away from the university and the university's server is very strict about which IP's can use the www2 subdomain (which is the subdomain that runs perl scripts). And the IP I'm working from gets me the error:



Forbidden

You don't have permission to access /~w3dixon/cgi-bin/lab4.cgi on this server.

Apache/2.2.22 (Debian) Server at www2.scs.ryerson.ca Port 80



Here's the link, if you want to try to access the script yourself.

So I'm being blocked. Normally I'd contact the sys admin and get them to unblock me, but a working perl script is due tonight. (I also tried using a VPN, it was blocked as well).

My solution was to SSH with terminal on my mac and/or Putty on my PC into Ryerson's server and use the unix command 'lynx' to run my scripts (since they aren't blocking their own IPs).

I was having some success, until I tried to use the perl get method from an html form (I copy pasted a script from https://www.tutorialspoint.com/perl/perl_cgi.htm just to get started, to see if syntactically correct code would work properly with my lynx strategy).

So when I was working on my script using a terminal at the university (with google chrome), my scripts worked fine.

Ryerson (my university), doesn't have a remote access program set up (other than ssh), but is there a way to access my webpage through their servers on a GUI browser installed on my machine?

Community
  • 1
  • 1
Will Dixon
  • 41
  • 1
  • 6

1 Answers1

3

An SSH tunnel is most likely the most feasible and easiest way to do what you want. Set up the tunnel like this:

ssh -L8080:www2.scs.ryerson.ca:80 username@www2.scs.ryerson.ca

If the www2 server is not the host you SSH to, simply replace the second instance of it in the command with the SSH server.

I use port 8080 here, as that alleviates you from needing root privileges.

Now, on your local workstation, in your browser, browse to:

http://localhost:8080
stevieb
  • 9,065
  • 3
  • 26
  • 36
  • nuts, I'm getting an error from terminal when I try and look at port 8080 channel 2: open failed: administratively prohibited: open failed probably means I don't have permissions to do this. – Will Dixon Oct 30 '16 at 17:11
  • yeah, I've searched the error, and it means I don't have permissions to do this. Still yours is the answer I was looking for so tyvm – Will Dixon Oct 30 '16 at 17:16
  • 1
    Sometimes the sshd (the `ssh` daemon, i.e. the server side's end of your ssh connection) is configured to disallow ssh tunnels. Perhaps this is the case here. – PerlDuck Oct 30 '16 at 17:53