The network looks like this : Server X -- My machine -- Server YMy machine has SSH access to both boxes. Server Y has internet but not server X.How can I make a tunnel so server X can acces the internet through Y?Thank you
SSH tunnel between 3 box to get internet access
linux;ssh;networking;routing;ssh tunneling
There are several ways of doing this but none of them are good solutions.  The way I would probably do it if I had to is like this:From your machine, tunnel port 222 from your machine to port 22 server Yssh -L222:localhost:22 serveryFrom server X, create a dynamic tunnel from server X to server Y using the previously constructed tunnel. Note: your destination on this command is mymachine but the credentials you'll use are for server Y since it's what you're actually connecting to.ssh -D8080 -p 222 mymachineSetup server X with a system wide SOCKS Proxy of localhost:8080