Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SSH and HTTP
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mrdew
n00b
n00b


Joined: 07 Apr 2004
Posts: 13

PostPosted: Wed Nov 03, 2004 2:30 am    Post subject: SSH and HTTP Reply with quote

Hello,
I want to watch my daughter at daycare. I am blocked by a proxy server at work. I can ssh into my gentoo box at home without a problem. My question is, can I use my gentoo box at home as my proxy through ssh. I assume I will have to use squid. I use putty on windows at work. Any advice or pointer would be greatly appreciated. I chose this daycare just because of the internet cameras, imagine my horrow when I can't access it from work.

:?
_________________
Mr. Dew
Back to top
View user's profile Send private message
SoTired
Apprentice
Apprentice


Joined: 19 May 2004
Posts: 174

PostPosted: Wed Nov 03, 2004 2:43 am    Post subject: Reply with quote

If you have X and a browser on the gentoo box at home you could just use X11 forwarding, and it will encrypt the traffic from your work computer to the home computer. I can't say about squid, as I've never used it.

It would require a bit of setup however, you'd have to install cygwin with X on the windows box, then you'd just set 'X11Forwarding yes' in /etc/ssh/sshd_config and just check the enable x11 forwarding checkbox under tunnels (in putty).


Also, another idea, would just be to make a cronjob that wgets the picture files and puts them in an apache (or something smaller like boa) htdocs directory so you could serve them (slightly delayed) from your home computer.


Hmm, ideas keep coming - you could also try searching around for/writing a PHP script that allows you to browse to an arbitrary url, with PHP5 I believe that can be accomplished with only one function call.


Then again a full proxy like squid would always work too, but squid frightens me in its complexity.
Back to top
View user's profile Send private message
Syldorian
n00b
n00b


Joined: 14 Jan 2004
Posts: 31

PostPosted: Wed Nov 03, 2004 10:25 pm    Post subject: Reply with quote

I do basically what you're talking about all the time. You need to emerge squid and get it set up (not too difficult). Just do a google search for squid and "setup" or something similar.

Once you have squid going on your gentoo box, you can ssh into it from anywhere and forward the correct port via an ssh tunnel. For instance, my squid server listens on port 8080. To set up an ssh tunnel in putty, you'll need to go to the "Tunnels" option on the connection screen (it's on the left, along with all the other settings). I'm doing this from memory, btw, so I apologize for the vagueness. But at the bottom of the "Tunnels" screen there'll be a couple of boxes next to an "Add" button. I can't remember what they're labeled, but there's a small box to the left of the "Add" button. This is the port that ssh will open on your windows box to forward connections to. This can be whatever you want, but I normally set it to '8080' to be consistent. There's another box below the "Add" button (a larger box). In this one, put "localhost:8080". This is the remote port that will be opened on your gentoo box. So any information sent to port 8080 on your windows box will be forwarded to port 8080 on your gentoo box (which is where the proxy server is listening). Put those settings in, and hit "Add".
OK, now go and connect like you normally do. Then, in your browser settings, there'll be a place to set it up to use a proxy server. Set it to "localhost" on Port "80". There'll probably be several of these...http, ftp, etc. I normally just set all of them to the same thing, although I'm not sure if squid handles all those protocols. I haven't had any issues so far, though. Now all your web traffic should be tunneled to your gentoo box. You might do a 'netstat' at a command line on your windows box to make sure it's working. You should see several "localhost:XXXX" entries, where XXXX is some random numbers. If you see several of those, then you should be good.
Anyway, that's how mine is set up. Sorry if it's kind of vague....let me know if you have any problems.
_________________
My photography website: http://www.kratzweb.net
Back to top
View user's profile Send private message
mrdew
n00b
n00b


Joined: 07 Apr 2004
Posts: 13

PostPosted: Tue Nov 09, 2004 1:28 am    Post subject: Thanks for the replies, but a little more help please Reply with quote

Thanks for you help. I have tried the x11 forwarding, I have that working. Very cool. Unfortunately my daughter's daycare demands internet explorer.
So I decided to try squid. Problem is I can't get squid working. Here is the output:

root@freller init.d # pwd
/etc/init.d
root@freller init.d # ./squid start
* Initializing cache directory: /var/cache/squid
/sbin/runscript.sh: line 532: 18559 Aborted /usr/sbin/squid -z -F 2>/dev/null
* Error initializing: /var/cache/squid
root@freller init.d #

By the way, I am being forced to learn more and more about gentoo, and I like it. :D
Thanks in advance.
_________________
Mr. Dew
Back to top
View user's profile Send private message
mrdew
n00b
n00b


Joined: 07 Apr 2004
Posts: 13

PostPosted: Wed Nov 10, 2004 3:32 am    Post subject: Squid is Fixed--Problem Solved Reply with quote

Hello,
Got squid working. First I emerged --usepkg. It then seemed to work. Something must be broken in the runscript.
I finally found a http_access deny all in the squid.conf file.
Thanks for all the help guys. I really appreciate it. Can't wait to try this out tomorrow from work.

:D
_________________
Mr. Dew
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum