irishbiker
Posts: 4
Joined: Thu Jul 31, 2014 8:46 am

VPN either on selective ports or ouput only

Thu Jul 31, 2014 8:59 am

Hi All

I've setup openvpn + PIA on my B and its working great. My question is, I've installed a web cloud server (BarracudaDrive) but of course as soon as I start openvpn all the traffic is routed via tun0 and I then cannot connect to my box remotely.

Is it possible to redirect certain ports to not use tun0 (eg SSH or Port 80) or have the B listen to incoming traffic on eth0?


Thanks In Advance

Paul

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: VPN either on selective ports or ouput only

Thu Jul 31, 2014 12:50 pm

Can you give some more detail about what you are trying to achieve?
Unix engineer since 1989

irishbiker
Posts: 4
Joined: Thu Jul 31, 2014 8:46 am

Re: VPN either on selective ports or ouput only

Thu Jul 31, 2014 1:53 pm

Sorry I thought it was clear, my fault. I want to use SSH,cloud server etc etc while my VPN is switched on. Currency all traffic is directed via the VPN (tun0) My question(s) are:

1. Can certain ports be directed to use eth0 instead of tun0 for example Port 80, 22 etc.etc.

2. Is it also possible to have my Pi only use the VPN Tun0 on traffic that is out bound?

Maybe Split tunneling?

cpc464
Posts: 239
Joined: Tue Jul 08, 2014 5:10 pm
Contact: Website

Re: VPN either on selective ports or ouput only

Fri Aug 01, 2014 11:03 am

VPNs are pretty bullet proof. I think you have to be in the VPN or out of it, no splitting. But I don't really know TBH.
Unix engineer since 1989

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: VPN either on selective ports or ouput only

Fri Aug 01, 2014 11:49 am

Most servers can be instructed to bind only to a specific
interface while defaulting to all (at least lighttpd and Apache
offer it) - i don't know if BarracudaDrive works similiar.

As for clients , i have no idea. In the worst case you will have
to meddle with iptables.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

irishbiker
Posts: 4
Joined: Thu Jul 31, 2014 8:46 am

Re: VPN either on selective ports or ouput only

Fri Aug 01, 2014 2:07 pm

I did come across this - which is basically what I want to do. Its for Centos (RH Distro).

Anyone review and convert the instructions to work Raspbian?

http://www.gigahype.com/setup-split-tun ... g-openvpn/

irishbiker
Posts: 4
Joined: Thu Jul 31, 2014 8:46 am

Re: VPN either on selective ports or ouput only

Wed Aug 06, 2014 12:00 pm

Can anyone give me any pointers to get this to work on my Pi?

Return to “Beginners”