From 11d6e23c4abf1274261d034d0d31b3a9390f7e06 Mon Sep 17 00:00:00 2001 From: Chris Koeritz Date: Mon, 5 Mar 2012 19:11:57 -0500 Subject: [PATCH] gets to the uva web sites as if we're on the campus network. --- scripts/security/uva_web_proxy.sh | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 scripts/security/uva_web_proxy.sh diff --git a/scripts/security/uva_web_proxy.sh b/scripts/security/uva_web_proxy.sh new file mode 100644 index 00000000..c7c51eda --- /dev/null +++ b/scripts/security/uva_web_proxy.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# this script makes a tunnel for SMTP traffic and others. a remote ssh server +# is required. this is especially useful for routing around firewalls using +# a web proxy like squid. when used for SMTP, it ensures that none of the +# text is seen on whatever network one is on before it's sent from the remote +# server. + +#hmmm: none of the user info below will work for others: parameterize it. + +#source $HOME/yeti/scripts/launch_feisty_meow.sh + +soundfile=$FEISTY_MEOW_DIR/database/sounds/woouoo.wav +if [ ! -z "$1" ]; then + soundfile=$1 +fi + +while true; do + echo Connecting uva web sites via khandroma. + ssh -i $HOME/.ssh/id_dsa_fred -2 -N -v -D localhost:14420 fred@khandroma.cs.virginia.edu + bash $FEISTY_MEOW_SCRIPTS/multimedia/sound_play.sh $soundfile +#hmmm: parameterize this for the sound to be played. doofus. + echo "Got dumped from tunnels; re-establishing connection." + echo "Note: if you're being asked for a password, you haven't set up an RSA key yet." + sleep 14 +done + +#-L 8028:localhost:3128 + +#-L 8043:localhost:443 + +# ports sometimes used: +# 25 is the sendmail tunnel. +# 3128 is the squid proxy server. +# 443 is the https version of squid. + +# ssh flags in use sometimes: +# -f go into the background once connected. +# -2 enforce ssh version 2. +# -N don't execute any command; just forward data between the ports. +# -L (port:host:hostport) connect the local machine's "port" to the +# remote port "hostport" on the "host" specified. the local "port" +# becomes an alias for the remote port. note that the connection +# being made to host and hostport is from the perspective of the ssh +# server, not the local host. + + -- 2.34.1