I'm trying to setup a vpn to restrict access for some parts of our website, like admin interface, kibana, ...
I use the openvpn inside a docker container with the following config.
When I do `curl v4.ifconfig.co` from a connected client it shows me the ip from my server as expected.
When I send a request to my own webserver running in another container the logs show me a connection from my clients public ip.
What i would have expected is a connection from the clients vpn internal ip (192.168.155.x) or from the server ip.
How can I change that behavior?
I would then restrict access to certain parts to connections from 192.168.155.0/24 or the server ip.
Is that how you do this?
Sorry I'm new to that stuff
Thank You for your help.
server 192.168.255.0 255.255.255.0
management 0.0.0.0 2080
keepalive 10 60
# Rely on Docker to do port mapping, internally always 1194
### Push Configurations Below
push "dhcp-option DNS 220.127.116.11"
push "dhcp-option DNS 18.104.22.168"
push "comp-lzo no"
push "route 22.214.171.124 255.255.255.0"
push "route 126.96.36.199 255.255.0.0"
I've tried to setup an iptables rule to change the source of the requests like this (inside of the container):
iptables -t nat -A POSTROUTING -j SNAT --to-source 127.0.0.1