Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Question

Raspi as VPN Gateway

Dec 6, 2016 12:32PM PST

hey,
i want to use my raspi as vpn gateway. I managed to setup the vpn on the raspi (and i also fixed the dns leaks) but when i connect with another device to it i am connected but i dont have internet
to connect to it i choose my router at wifi, put in the routers password, gave my device an ip, took the raspis ip as gateway and for dns i tried raspis ip, the dns servers my vpn provider(pia) recommends and i also tried googles but none worked :/


can u maybe help me to fix this pls ?

Discussion is locked

- Collapse -
Answer
Quite the abitious project.
Dec 6, 2016 12:47PM PST

This is something I'd get my router to do rather than coding or creating from scratch.

But if I did want to learn networking this might be something I'd do later after I get my raspi working as a router first. I don't know of any specific forum but watch yourself. Don't ask for others to do your work. Sometimes a new programmer comes out with guns blazing demanding support. This one is where you learn as much as you can over time.

If you want a more instant VPN Gateway, do that in a router that has that feature.

Here I'm just running either the TAILS OS or a Tor Browser if I want to secure my comms.

- Collapse -
Meh...
Dec 6, 2016 12:50PM PST

Well I am trying to make this work since more than a weak...
I just want it to work -_-

- Collapse -
That project is more of a 6 to 12 month long deal.
Dec 6, 2016 1:31PM PST

You have to either find a working project you can modify or start a new project.

For ready to use, you would never replay with Meh... You would use a router with the VPN feature ready to use.

- Collapse -
title
Dec 6, 2016 1:38PM PST

dude i just want it to work and no advise for my life...

- Collapse -
Then read the second reply.
Dec 6, 2016 1:47PM PST

My advice is free, not about your life. Only you can make this work. I don't see folk jumping out to help folks that dive into a deep project like this.

Unless you reveal something specific that someone can help with. For example if you had asked me about what DNS should work or about a hosts entry but you want a ready to use product.

That's called a router.

This raspi is more a complicated piece of machinery and not for those that "just want it to work." If that upsets you, this is not a good project for you.

- Collapse -
Example RasPi router with VPN
Dec 6, 2016 1:43PM PST
https://gist.github.com/superjamie/ac55b6d2c080582a3e64

Mind you this looks complete to me. However whoever implements this would know a few basic networking things. If you can't juggle DNS, netmask or place this behind a router (bad idea) then you are not ready to do this.

I don't know your skill level but it does look like it can be a VPN router.
- Collapse -
Title
Dec 6, 2016 1:55PM PST

Do u think I didn't try to fix it myself?!
I followed that guide but it didnt work
Because I had no vpn on the raspi cuz of DNS Servers but now I fixed the problem, unfortunately (unlike before when I didnt have vpn) it isnt working as gateway anymore

- Collapse -
No I don't know either thing.
Dec 6, 2016 2:05PM PST

I don't know your skill level. Your posts do show you may not have the patience to work this problem.

I think you need to give it time and if you must use a VPN, just put that on your PC for now. Almost all the VPNs let us use them from our PC.

Your last post has "I fixed the problem." So what was it?

- Collapse -
Title
Dec 6, 2016 2:11PM PST

Im not patient anymore...

I fixed the DNS leak...

I got a vpn, as I already said... The vpn is working fine on the raspi.

- Collapse -
And there is another issue.
Dec 6, 2016 3:13PM PST

Folk that use open source stuff and don't share their fixes are less likely to get help from others. Be sure to tell the RasPi VPN Router author of your fix so it can get rolled in.

Take credit for your work.

- Collapse -
Title
Dec 6, 2016 10:01PM PST

I doubt its a general problem since many wrote down in the comments that it works just fine