xu4 to share vpn access

Moderators: mdrjr, odroid

xu4 to share vpn access

Unread postby jbodhorn » Mon Apr 25, 2016 1:57 am

My xu4 is currently set up on my home network as a nas with samba and ftp, today I'm going to set up a simple apache ftp server for access to my files through the internet. There is one more thing I'd like to do with the odroid that I'm not sure what the best way of doing is and I was hoping to get some input on what the best most reliable way of doing this is going to be.

Currently the on board ethernet is plugged into our router/modem(a fios quantum gateway), I would also like to connect to vpn through PIA's vpn service and use a usb 3 ethernet adapter to share that vpn connection to a second router, this router can also be used as a switch if that would work better. I've set up a raspberry pi as a wifi hotspot with all traffic connected to the hotspot routed through vpn before. The performance on the RPi hotspot wasn't very good, I wasn't able to plug into ethernet either, and the range was terrible, this is why I'd like to use a second router(or the router as a switch/wifi ap) this time around.

I'd like to be able to have anyone that wants to be able to connect to vpn to be able to do so through the second router without having to set anything up. No installing vpn software, no downloading and setting up conf/ovpn, no worries about leaks of any sort, I want the ordroid to take care of that. I want to use the odroid as a gateway to the vpn by sharing my connection to the second router/switch, so that anyone's traffic that is connected to the second router/switch is sent through the vpn.

I know there are a couple ways of doing this, some simpler than others, and I'm not sure which will best suit my needs. do I set up the odroid as a router and use the router as just a switch/wifi ap, or am I better off setting up the odroid to share its internet and leave the router to do its job normally. If I use the router as a router I have a few options for getting it connected to the internet provided by the odroid, the router will accept a connection provided through dhcp(dynamic), static, PPTP, PPPoE, and something called Telstra BigPond which I've never heard of.

My current feelings are that I should set up a dhcp server and leave the router as is after a factory reset, it's set up as a router ready for a dynamic connection. If this works like it did when I set up the RPi hotspot I can just use PIA's dns service since my traffic will be going through their servers anyway. My main concern is routing the traffic because every time I disconnect and reconnect to PIA's vpn I will be provided a new ip. I'm going to do some reading on iptables once I get apache up and running, I believe I can set rules based on adapter and/or virtual adapter rather than ip range, I think that's how I did the RPi hotspot but that was quite a while ago.

On the odroid I'm currently running Arch Linux, Linux alarm 3.10.96-5-ARCH #1 SMP PREEMPT Mon Apr 11 21:21:24 MDT 2016 armv7l GNU/Linux. I was messing around a bit yesterday and found I can't use these commands: iptables -t security -F and iptables -t security -X. I'm guessing that is because this is an older kernel, is this going to be an issue? I think I found a newer Arch arm image, but this was kinda after I set up everything that I have set up, I'm not even sure how much newer it is. ATM I don't really want to lose all the work I've done, I've had to do it all through ssh because every time I use a keyboard plugged into the odroid it freezes after each command. I've tried a few different images and arch is the only one that does this to me, and of course it's the one I'd prefer to use....
jbodhorn
 
Posts: 13
Joined: Sun Mar 13, 2016 10:36 am
languages_spoken: english
ODROIDs: odroid-xu4

Re: xu4 to share vpn access

Unread postby jbodhorn » Thu Apr 28, 2016 11:33 am

I've been reading a lot because I hope to get this set up right the first time... Currently I'm using systemd-networkd to get an ip via dhcp from my modem/router for the on-board ethernet adapter eth0 . My current thought is to use systemd-networkd to set a static ip for the usb 3 ethernet adapter eth1 and then use dnsmasq to give my router an ip. Then enable packet forwarding and set iptables.

I believe that will work to get internet to my second router, but my iptables knowledge is next to none and I still have some reading to do. I don't currently have the odroid set up as a vpn client to PIA, I was hoping to get the router situation settled before trying to add the vpn into the mix.

Once the router is getting internet access and devices can connect to it the only thing I should then have to do is change the rules in my iptables to use tun0(or whatever the vpn's virtual adapter is named) instead of eth0 right?
jbodhorn
 
Posts: 13
Joined: Sun Mar 13, 2016 10:36 am
languages_spoken: english
ODROIDs: odroid-xu4

Re: xu4 to share vpn access

Unread postby mhoyek214 » Wed Aug 16, 2017 12:34 pm

jbodhorn, did you get this working? If so, what were your steps? Currently thinking of a very similar solution for my home network (Clients -> WiFi Router -> Odroid XU4 [VPN & NAS & maybe HTPC] -> Modem). Looking for some guidance as to your config and if it worked. Steps too, please. Do you think the Odroid could host the wifi router for the connecting clients? If so, do you think the Odroid could connect to the modem wirelessly too?
mhoyek214
 
Posts: 2
Joined: Thu Jun 29, 2017 1:31 pm
languages_spoken: english
ODROIDs: Odroid-XU4


Return to Projects

Who is online

Users browsing this forum: No registered users and 1 guest