Archive for May, 2010

OpenVPN Setup tips

To send all traffic over an established VPN connection:

sudo iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
sudo -s echo “1″ > /proc/sys/net/ipv4/ip_forward
sudo openvpn /etc/openvpn/server.conf

     

2 Comments

SSH Tunneling Tips: Now With More Awesome!

OK, that previous tip was pretty weak. Try this instead. Set up a SOCKS proxy and tunnel it through SSH!

Here’s how:

1. Open the SSH connection…
ssh -ND 8887 -p 22 rufus@83.27.411.896

2. Set your network to point to the proxy. On a Mac that would be…
a. Open Network Preferences…
b. Click Advanced…
c. Click Proxies…
d. Check the SOCKS Proxy box then in the SOCKS Proxy Server field enter localhost and the port you used (8887)
e. OK and Apply and you are done!

p.s. Bonus! You can enable gzip compression by setting the -C flag (ex. ssh -C -ND 8887 -p 22 rufus@83.27.411.896)

     

No Comments

SSH Tunneling Tips

To tunnel one, single website over SSH:
ssh -L 8887:google.com:80 -p 22 -l rufus -N 83.27.411.896

Explanation:

The first port, 8887, is the one on your local machine that you are going to point your proxy to….
… next comes the website you are visiting…
… next is the port of the service on the remote computer you will be accessing
Web: HTTP 80
Web over SSL: HTTPS 443
Outgoing email: SMTP 25
Incoming email: POP3 110
Incoming email: IMAP 143

… next comes the port your SSH is set to (default is 22)…
… next is the user you will log in as…
… next is the address of the ssh server you are accessing.

That’s it. But you only gain access to Google. Try to go outside of that and you will get sent back to Google.

     

No Comments