LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-27-2006, 07:58 AM   #1
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Apache and http_tunnel-like on same port


Hi
Is it possible to share the same port 80 between apache and a tunnel?

Example at work I can only get out of the firewall by port 80. On my server I have apache. But sometimes I would like to ssh to it also.

Does a module exist for apache?

Or could this be achieved by some other stuff? Modifying http_tunnel would be my last resort...
 
Old 02-28-2006, 05:24 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
You can't have 2 different processes use the same port at the same time. But I don't know if a module exists for Apache to allow this. I assume you want an SSH client to appear in your browser that talks to your SSH server.

I used the info at http://www.linuxjournal.com/article/6453 to allow me to run commands on my server while I'm at work since our proxy also stops SSH access. It looks a little clunky when you read the article but it works very nicely. Basically I can send an email to a particular address on my server, with a particular subject, formatted a particular way (optionally signed with gpg) and have it run the commands in the email.

Sendmail and procmail work together with this and when a qualifying email is received the commands in it get parsed, filtered and run by a perl script. The results of the command are emailed back to me. To keep everything away from prying eyes I read my mail via a web browser over SSL.
 
Old 02-28-2006, 06:14 PM   #3
Silensium
LQ Newbie
 
Registered: Feb 2006
Distribution: Slackware 10.0
Posts: 5

Rep: Reputation: 0
Isn't it too slow , too using email as bash ?
I don't understand , why it is better , than using
a virtual console ( CGI-based script , that use's
system() too run sh commands , for example).
There is a lot of web interfaces , that Hosters
already use.
Sure , you need good secure for this script ,
if you wish too admin server.
 
Old 02-28-2006, 08:12 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
When I set it up on my PC (early 2003 IIRC) I didn't need anything more than to send the occasional command. I was also setting up some mail filters via sendmail/procmail stuff for an employer so it was a useful tutorial for me.

I still use it occasionally because it solves a particular type of problem. I'm lucky enough these days that when I need to run more than one or two commands on my home setup, I can work from home and remote access isn't required
 
Old 03-01-2006, 02:44 AM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by gilead
You can't have 2 different processes use the same port at the same time.
But I don't know if a module exists for Apache to allow this.
I assume you want an SSH client to appear in your browser that talks to your SSH server.
Yes, by definition one port for each applications, thats exactly why I thought of an apache module, even if I would be suprised to find one
No no, I don't really need it in my browser, that would be over my expectations. Just from a ssh client, that connects to my local tunnel, that gets untunneled by an app on the server that would go to the ssh server(usual way in fact..)
I could use vnc2swf but this is the tweaking part
Quote:
Originally Posted by gilead
I used the info at http://www.linuxjournal.com/article/6453 to allow me to run commands on my server while I'm at work since our proxy also stops SSH access. It looks a little clunky when you read the article but it works very nicely. Basically I can send an email to a particular address on my server, with a particular subject, formatted a particular way (optionally signed with gpg) and have it run the commands in the email.

Sendmail and procmail work together with this and when a qualifying email is received the commands in it get parsed, filtered and run by a perl script. The results of the command are emailed back to me. To keep everything away from prying eyes I read my mail via a web browser over SSL.
Good, I wanted to do this for a specific server so I'll put this in my bookmark (I did it in an awful way as I'm not a procmail expert). But now I need an interactive session, with completion and stuff

Quote:
Originally Posted by Silensium
There is a lot of web interfaces , that Hosters
already use.
Interesting, I didn't think of it. Yes the security scares me a bit but this I would harden it.
Do you know of any php (or better perl or cgi) that could give me a login console? Rather than redoing the wheel.. I would then put it on ssl I think..

Thanks!

Last edited by nx5000; 03-01-2006 at 02:45 AM.
 
Old 03-01-2006, 01:28 PM   #6
abhijeetudas
Member
 
Registered: Sep 2004
Distribution: Redhat / Fedora
Posts: 114

Rep: Reputation: 15
Well what i was thinking was that you could use stunnel if the port no's dont matter to you.

Run Stunnel on port 80.
& run web server on say 8080 & SSH on 22.

& then use accept connect.

I had a similar need for which i used stunnel


so if i ssh 'ed to localhost 8888 i would get to port 22 on the other machine
& when i pointed my browser to localhost 8889 i would get to the web servr.

this is doable.

Not sure if this is the thing you are looking for,
 
Old 03-01-2006, 07:31 PM   #7
Silensium
LQ Newbie
 
Registered: Feb 2006
Distribution: Slackware 10.0
Posts: 5

Rep: Reputation: 0
Can't remember . I think , you will find
a lot of them in CPAN.
I don't have my own server , and
just thought about cgi , because of using this
simple script , to get bash with hosters , who
gives Perl , but no ssh/telnet access.

#!/usr/bin/perl -w
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
print "Content-type: text/html\n\n";
#my $CGI = new CGI;
$co=new CGI;
print qq();
print system($co->param('text'));
print $co->startform( -method=>'POST' ), $co->textfield('text'),$co->p, $co->submit, $co->endform;
print qq();



Stunnel is interesting. I will learn more about it.Thanks.

Last edited by Silensium; 03-01-2006 at 07:39 PM.
 
Old 03-02-2006, 04:59 AM   #8
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Original Poster
Rep: Reputation: 57
Quote:
Originally Posted by abhijeetudas
Well what i was thinking was that you could use stunnel if the port no's dont matter to you.

Run Stunnel on port 80.
& run web server on say 8080 & SSH on 22.

& then use accept connect.


Not sure if this is the thing you are looking for,
Yes that's a good idea, but nobody will ever be able to access to my web server anymore, thats also part of what I want.
Nevermind, I think I'm asking too much

Thank you all
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fedora/apache doesn't like port 80 illtbagu Linux - Software 4 04-13-2004 12:41 AM
Apache proxy -- what port? Apollo77 Linux - Software 0 08-11-2003 09:49 AM
Apache - Port 80 problems case1984 Linux - Networking 9 06-15-2003 12:20 PM
changing Apache port GabeF Linux - Networking 5 10-07-2002 03:13 PM
apache - cant connect. port already in use... gene_gEnie Linux - Networking 13 04-17-2002 07:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration