[TLDR]
I want my vpn clients to
exist on my LAN.
I want my router to give them dhcp.
I want them to behave as if they are connecting through another Ethernet port on my switch.
and most importantly, I want my own computer, to have all this configuration transparently
so that my own network configuration will not be altered beyond recognition.
this is my working-albeit-crazy setup:
Internet-Router-Switch-Eth0-Linux->
Linux->Openvpn server->wifi usb stick(wlan0)->android access point->
android access point->wifi->openvpn client->laptop
[/TLDR]
as of right now, after openvpn has started and the client has connected,
I need to perform some manual things to complete my setup
https://openvpn.net/index.php/open-source/documentation/howto.html#redirect
some I can do by editing /etc/openvpn/server.conf
some I need to manually 'push' via the openvpnas excellent (but not thorough and complete) web interface
some I need to perform via bash
I suppose I could make a script that does all that for me, but it feels unclean and not the way I want it to be.
right now the client gets it's ip address from the vpn server
I want to shutdown the vpn server's dhcp ability,
and bridge eth0 and tun0 in a very important way:
I will still have dhcp from my own router for my own computer just like before, the router will not see any difference regarding identifying my computer and hopefully, still with the same MAC address.
(*I think I read somewhere that tun0 can't be bridged, only tap0, but I need to set up openvpn to create that tap0 for me first, am I correct?)
at first glance, I though that this wouldn't be very trivial, and that the only way for me to communicate from my computer
to my lan as before, is by setting a static ip address for the bridge that would match the same ip address the router gives me
then I would also have to make sure I set the dns, and other configurations the router usually dynamically gives me as well... which is not what I want to do.
then I thought that I should run another vpn client - ON THE SAME COMPUTER that runs the vpn server
and just as the laptop gets to be on my lan now, bridged, just as if it was connected through another port in my switch
so will I. but this solution also feel unnatural.
if you are asking yourselves why am I setting up this insanely stupid network,
its because I just bought myself a new DELL that has only wifi, but my router doesn't have wifi and I don't want to buy a wireless access point.
and my wifi usb stick has hardware limitations that prevents it from broadcasting an access point.
another reason I am pursuing this, is because its fun, and a great learning experience.
if you were able to bear with me this far, and you immediately see how everything I want could be implemented in a much simpler way 🙂
please write everything down before you forget 😛
thank you.