Ubuntu – Log and analyze web traffic passing through SSH SOCKS proxy

PROXYsshssh-tunnelUbuntu

I've got a cheap VPS running Ubuntu 12.04 that I sometimes proxy web traffic through via SSH when I don't trust the network I'm on. I'd like to have a closer look at some of that traffic on occasion. Is there an easy way to log extra information about HTTP requests passing through sshd?

There's nothing else running on the server, so logging all the OS's incoming and outgoing traffic is also a viable solution. I don't really need the actual data itself logged, mostly just the headers.

Best Answer

You can install a proxy server like nginx on your vps to accept request from local port 8080. Then setup your ssh tunnel to nginx port. Then check nginx access log whenever you like.