cleaning a bit, including moving out some old docs, and renaming
[feisty_meow.git] / scripts / security / uva_web_proxy.sh
1 #!/bin/bash
2 # this script makes a tunnel for SMTP traffic and others.  a remote ssh server
3 # is required.  this is especially useful for routing around firewalls using
4 # a web proxy like squid.  when used for SMTP, it ensures that none of the
5 # text is seen on whatever network one is on before it's sent from the remote
6 # server.
7 #
8 # it accepts a single parameter so far, which will be used as the name of a
9 # sound file to play.
10
11 #hmmm:  none of the user info below will work for others: parameterize it.
12
13 #source $HOME/yeti/scripts/launch_feisty_meow.sh
14
15 #ssh_host=khandroma.cs.virginia.edu
16 ssh_host=mason.cs.virginia.edu
17
18 soundfile=$FEISTY_MEOW_DIR/infobase/sounds/woouoo.wav
19 if [ ! -z "$1" ]; then
20   soundfile=$1
21 fi
22
23 while true; do
24   echo Connecting uva web sites via a machine on site: $ssh_host
25   ssh -i $HOME/.ssh/id_dsa_fred -2 -N -v -D localhost:14420 fred@$ssh_host
26   bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh $soundfile
27   echo "Got dumped from tunnels; re-establishing connection."
28   echo "Note: if you're being asked for a password, you haven't set up an RSA key yet."
29   sleep 14
30 done
31
32 #-L 8028:localhost:3128 
33
34 #-L 8043:localhost:443 
35
36 # ports sometimes used:
37 #     25 is the sendmail tunnel.
38 #   3128 is the squid proxy server.
39 #    443 is the https version of squid.
40
41 # ssh flags in use sometimes:
42 #   -f   go into the background once connected.
43 #   -2   enforce ssh version 2.
44 #   -N   don't execute any command; just forward data between the ports.
45 #   -L   (port:host:hostport) connect the local machine's "port" to the
46 #        remote port "hostport" on the "host" specified.  the local "port"
47 #        becomes an alias for the remote port.  note that the connection
48 #        being made to host and hostport is from the perspective of the ssh
49 #        server, not the local host.
50
51