# How do I use my Gentoo box as a secure proxy?

## Biru

I have a Gentoo box which is connected via ethernet to my ADSL router.  When I'm away from home, and on a laptop using an insecure connection, I'd like to connect back to my Gentoo box securely, and then have it as my proxy so all traffic is encrypted leaving my laptop, sent to the Gentoo box which relays it normally to the internet, then sends the response back to my laptop encrypted.

Is this really as simple as logging in to the gentoo box via SSH using -D random port and then setting Firefox to use localhost as a SOCKS proxy using the same port?

----------

## Manko10

Yep, that's called "tunneling" but why don't you just try it out?

But note that you also need to set network.proxy.socks_remote_dns to true in your Firefox' about:config in order to also tunnel DNS lookups.

----------

## Biru

Excellent.  So really all I'll need is to have SSHD running on the Gentoo server?  Oh and proper port forwarding on the router.  For example, I ensure that port 12345 on the router is forwarded to the IP of the Gentoo box on the LAN (192.168.1.68 for example)?

----------

## Manko10

You need to open that port in your router which your SSH server is listening to but you don't need to open any port on the client side since you've established a tunnel connection.

----------

## Biru

Cheers, I appreciate your help in clarifying this matter for me!

----------

