1

I was looking into forwarding/routing my linux computer's traffic through my raspberry pi to the router to the internet, is this possible?

I currently have a vpn set up on my rpi with hamachi, and privoxy set up which my computer is configured to use currently, and the tor network is also connected to my rpi. I can use the vpn and privoxy, but not the tor network. I'm hoping by forwarding my traffic through my raspberry pi is that it will recognize from my pc that I'm on the tor network since my rpi's on it.

Note: I am currently using network-manager on my rpi because it has the option to connect to a vpn service which I will be doing later on when I have funds. I'm saying this because I won't be messing with /etc/network/interfaces which isn't a network-manager thing.

Thanks

1 Answer 1

2

Single-port Tunneling

  1. Create the tunnel
    • ssh -fND 7000 host
  2. Use the tunnel (chromium-browser example)
    • chromium-browser --proxy-server="socks5://localhost:7000"

You can look at program-specific documentation to learn how to use socks proxy with said program.


Entire Network Tunneling (VPN)

Using SSH

man ssh gives an example of exactly this. An ssh based vpn:

SSH-BASED VIRTUAL PRIVATE NETWORKS ssh contains support for Virtual Private Network (VPN) tunnelling using the tun(4) network pseudo-device, allowing two networks to be joined securely. The sshd_config(5) configuration option PermitTunnel controls whether the server supports this, and at what level (layer 2 or 3 traf- fic). The following example would connect client network 10.0.50.0/24 with remote network 10.0.99.0/24, provided that the SSH server running on the gateway to the remote network, at 192.168.1.15, allows it: # ssh -f -w 0:1 192.168.1.15 true # ifconfig tun0 10.0.50.1 10.0.99.1 netmask 255.255.255.252 

~~ snip ~~

 Since a SSH-based setup entails a fair amount of overhead, it may be more suited to temporary setups, such as for wireless VPNs. More permanent VPNs are better provided by tools such as ipsecctl(8) and isakmpd(8). 

Once you have that new interface up, you'd just have to make it the default route, which is a different question.

DNS Masquerading / iptables

You may also want a complete solution. If you want to take the time to turn your pi into a router, try Googling debian router (-1- -2-) or masquerading.

2
  • Ok, the guide I used to get hamachi vpn set up and privoxy is on here lifehacker.com/5978098/… and I have the privoxy set up on port 8118 which is also hamachi's port on the rpi. The rpi's ssh port though is 777. I tried doing ssh -fND 8118 pi@<ip here> -p 777, assuming 8118 is where i put the privoxy port. I did google-chrome --proxy-server="socks5://<same ip here>:8118", but I didn't have any difference. Commented Jan 17, 2014 at 17:57
  • Are you using Hamachi because you're working with Windows machines as well? I just have to say I would not suggest using Hamachi (even under these circumstances). Commented May 13, 2015 at 21:46

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.