/me découvre
via itweb
Un peu tordu.. Pour spécifier à Apache d'utiliser un proxy pour atteindre certaines URL
Pour utiliser machinerebond pour accéder aux *.vm automatiquement :
$ cat .ssh/config
Host=machinerebond
Hostname=machinerebond.fqdn.com
User=root
Host=*.distant
User=root
ProxyCommand=ssh -W %h:22 machinerebond
Alternative :
D'abord se co sur la machine rebond avec un -A pour ramener sa key dans l'agent distant
Ensuite on peut se co sur les autres machines, mais plus long.
Autres directives possibles :
ServerAliveInterval 30
ServerAliveCountMax 120
Port 22000
User fooey
IdentityFile ~/.ssh/github.key
LocalForward 9906 127.0.0.1:3306
more : http://www.openbsd.org/cgi-bin/man.cgi?query=ssh_config&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html
Ok the title may need some work but I am really excited that I found a way to make virtually any application to run over a SSH proxy without having to directly have support for the SOCKS protocol.
The first thing you need to do is go to SourceForge and download an application call proxychains. If you are using a debian based distribution, particularly Ubuntu you can simple use
sudo apt-get install proxychains
Once you have installed proxychains you need to connect via SSH to your SSH serve. You can use something like this:
ssh -fqND 5555 yanovich@10.28.183.40
This creates a connection to your ssh server and lets it run in the background. The 5555 is the port number it will run on the local level (the computer you can running proxychains from).
Next you need to edit /etc/proxychainds.conf (you'll need sudo permission to do this).
Uncomment "dynamic_chain" (by removing the # at the beginning of the line)
comment out "strict_chain" by adding a # to the beginning of the line.
Uncomment "quiet_mode" (This is not recommended the first time you do this. I would recommend doing this the second through once you are familiar with this and can see it is working).
Add "socks5 127.0.0.1 5555" on a new line at the bottom of the file.
Save
Now run the program you want to have applied this settings towards. For my situation I wanted to be able to use Opera Web Browser over SSH proxy but Opera doesn't have built-in SOCKS support.
$ proxychains opera
That line of code in the terminal will launch the Opera Browser and direct all traffic through the SSH proxy.
The above is recommended to be used for applications that do not natively support SOCKS. I would recommend doing the above in addition to apply a system wide setting (for Ubuntu you can do this through System > Preference > Network Proxy).