-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathsshcachetunnel.sh
More file actions
executable file
·26 lines (20 loc) · 893 Bytes
/
sshcachetunnel.sh
File metadata and controls
executable file
·26 lines (20 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
# SSH Cache Tunnel Script
# Author: V. Alex Brennen <vab@cryptnet.net>
# Copyright: None
# License: Public domain
# Date: 2003-11-01
# Dependencies: OpenSSH; Remote Squid proxy server
# Description: This script will tunnel an HTTP cache connection over SSH so
# that you can do off site testing of HTTP IP address access
# control/filtering restrictions through an external system
# while on a heavily firewalled LAN with limited exit ports
# allowed. Note: The browser should be configured to use the
# cache as if it was running on the localhost (loopback
# interface).
SSH=/usr/bin/ssh
SSH_PORT=22
LOCAL_PROXY_PORT=3128
REMOTE_PROXY_PORT=3128
PROXY_ADDR=offsiteproxy.example.com
$SSH -p $SSH_PORT -L $LOCAL_PROXY_PORT:localhost:$REMOTE_PROXY_PORT $PROXY_ADDR -f -N