I'm not sure if this is the right section, so forum moderator, feel free to move it if it is.
I'll first explain what I've been doing thus far.
I have a continental spanning class B network 172.22.0.0
The main network, with the oVPN Server, is running on 172.22.56.0/16
first oVPN client is running 172.22.57.0/16
second client is running 172.22.58.0/16
There are thus 20 subnetworks as clients.
All clients use dd-wrt.
Connection run as TAP devices and get oVPN client Ip's in the range 172.22.56.50-79
The main network gives thus local clients per dhcp IP's in the range of 172.22.56.100 -> 199
the oVPN clients get Ip's in the range 172.22.56.50 -> 79
This works splendid! But to get good vpn speed of 60+ Mbps i need to buy routers in the range of 200+ USD/piece.
As you can imagine, I wanted to try it with a raspberry pi 3, which has similar hardware compared to routers, even better in many aspects.
In the raspbian 4.4 version on the raspberry I have the wlan0 acting as access point.
the eth0 is running static ip 192.168.2.10 and makes a connection through the router 192.168.2.1
tap0 comes up.
with the raspbian I can access the whole class B network.
with the wlan0 access point I can get into the internet over eth0
but what I can't seem to get working, is getting clients on the wlan0 to access the tap0
the wlan network I tried everything from
192.168.3.0 network to 172.22.69.0
I tried 255.255.0.0 as well as 255.255.255.0
i tried
sudo iptables -A FORWARD -i eth0 -j ACCEPT
sudo iptables -A FORWARD -i wlan0 -j ACCEPT
sudo iptables -A FORWARD -i tap0 -j ACCEPT
sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
sudo iptables -t nat -A POSTROUTING -o tap0 -j MASQUERADE
and other combinations.
Now I can't get it to work. There's no possible way for me visible to get the clients behind the access point to be able to access the tap0 class B network.
Also, what is wondering me..
the oVPN on the raspbian makes a oVPN connection getting an IP in the oVPN Range of 172.22.56.50-79 and then it gets a 2nd IP from 172.22.56.100-199!!
No dd-wrt oVPN client gets such a strange thing.
In the end, the tap0 thus has an ip from the internal DHCP from the main network and not from the oVPN server.
Although "something" gets an ip from the oVPN DHCP as well.
strange behavior in the raspbian which dd-wrt has not.
Anyway, this doesn't disturb the raspbian to access the main and other client networks.
what is another interesting thing.
When I have wlan0 access point with the ip 172.22.69.1/24 the raspian can browse the network/windows network over the tap0 with the 172.22.0.0/16 without problems.
when I have wlan- access point with the ip 172.22.69.1/16 the raspian can NOT brosw this network at the other end of the tap0 anymore, but it can ping those devices on the other network! Just netbios or windows/network not working anymore.
I read a lot about setting up networks with raspbian, debian, ubuntu and 99,999% of the people online simply make connections to VPN services for hide-my-ass services using TUN devices.. and not access the other ends network anyway.
But I want a really private tap VPN layered 2, just as with dd-wrt it's working perfect, and I need this to be done on the raspbian.
I'm pretty sure it's possible.
And bridging wlan0/eth0 is working.
accessing tap0 class B network on the other end is also working.
I just need to figure out how to get from wlan0 to tap0?
Anyone with a good idea what I'm missing?