Jump to content
Not connected, Your IP: 18.191.147.146
Sign in to follow this  
Viktorrr

Forwarding traffic from wlan0 to tun0 in Raspbian

Recommended Posts

Hi,

I'm running a raspberry pi model 3 with built in WiFi with raspbian stretch lite as my operating system ( fresh install ) and i have Stunnel and OpenVPN installed and running ( connected to AirVPN ).

My intent is to use my raspberry pi as a wireless SSL VPN router.

I followed this guide to bridge my wlan0 traffic to eth0 traffic via br0
https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md

which works but its not taping into the OpenVPN tunnel I've created as it's routing the traffic to my ISP ( probably due to the eth0 bridge i made with wlan0), in reality what i want is my wlan0 traffic to access my tun0 interface that OpenVPN makes so my wireless appliances can access AirVPN SSL services.

I've done a bunch of reading and i'm kinda stuck any advice or HOWTO's that you can recommend.

Thank you !!!!

Share this post


Link to post

Have you set up IPTABLES NAT/masquerading? See this:

https://airvpn.org/topic/18519-ubuntu-server-as-vpn-routerconcentrator/?p=44440

You said "it's routing the traffic to my ISP". But without NAT set up on your raspberry, I don't see how traffic with a source IP inside your LAN could go out to either your ISP or AirVPN and be responded to properly. There would be no way for returning traffic to reach that internal/private IP LAN address.

 

I find your explanation of exactly what you are trying to do very unclear.

 

EDIT:

 

I had a glance at the guide, and I see that it does have this line:

sudo iptables -t nat -A  POSTROUTING -o eth0 -j MASQUERADE

Did you change eth0 there to tun0?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image
Sign in to follow this  

×
×
  • Create New...