s***@keemail.me
2017-03-29 09:26:04 UTC
I'm trying to get the tunnel server's IP address on the client, independent of the configuration file. For instance, I don't want to rely on default routes to identify the server's IP address for the tunnel.
I tried to use environmental variables with `--up`, but couldn't identify the server's IP.
ifconfig_local:is the client's IP for the tunnel.
ifconfig_remote:Should be the server's IP for the tunnel - from what I understand, but does not reflect the IP correctly for me.
Server config:
port 443proto udpdev tunserver 172.16.0.0 255.255.255.0ca /etc/openvpn/server/ca.crtcert /etc/openvpn/server/stretch-server.crtkey /etc/openvpn/server/stretch-server.keydh /etc/openvpn/server/dh4096.pemtls-auth /etc/openvpn/server/static.key 1tls-version-min 1.2tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384cipher AES-256-CBCauth SHA512verb 3log-append /etc/openvpn/server/log/stretch-server.logcomp-lzoduplicate-cnncp-disable
Client config:
clientverb 3port 443proto udpdev tunremote 192.168.178.150 443ca /etc/openvpn/client/ca.crtcert /etc/openvpn/client/stretch-client.crtkey /etc/openvpn/client/stretch-client.keytls-auth /etc/openvpn/client/static.key 0remote-cert-tls servertls-version-min 1.2tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384cipher AES-256-CBCncp-disableauth SHA512redirect-gateway def1comp-lzonobind
Client IP (`ip address for tun0`): Â 172.16.0.14Server IP (`ip address for tun0`): 172.16.0.1
echo $ifconfig_remote = 172.16.0.13echo $ifconfig_local  = 172.16.0.14
The ifconfig_remote variable does not reflect the server's tunnel IP address. I don't know what the .13 is supposed to be.
How do I get that IP address on the client?
I tried to use environmental variables with `--up`, but couldn't identify the server's IP.
ifconfig_local:is the client's IP for the tunnel.
ifconfig_remote:Should be the server's IP for the tunnel - from what I understand, but does not reflect the IP correctly for me.
Server config:
port 443proto udpdev tunserver 172.16.0.0 255.255.255.0ca /etc/openvpn/server/ca.crtcert /etc/openvpn/server/stretch-server.crtkey /etc/openvpn/server/stretch-server.keydh /etc/openvpn/server/dh4096.pemtls-auth /etc/openvpn/server/static.key 1tls-version-min 1.2tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384cipher AES-256-CBCauth SHA512verb 3log-append /etc/openvpn/server/log/stretch-server.logcomp-lzoduplicate-cnncp-disable
Client config:
clientverb 3port 443proto udpdev tunremote 192.168.178.150 443ca /etc/openvpn/client/ca.crtcert /etc/openvpn/client/stretch-client.crtkey /etc/openvpn/client/stretch-client.keytls-auth /etc/openvpn/client/static.key 0remote-cert-tls servertls-version-min 1.2tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384cipher AES-256-CBCncp-disableauth SHA512redirect-gateway def1comp-lzonobind
Client IP (`ip address for tun0`): Â 172.16.0.14Server IP (`ip address for tun0`): 172.16.0.1
echo $ifconfig_remote = 172.16.0.13echo $ifconfig_local  = 172.16.0.14
The ifconfig_remote variable does not reflect the server's tunnel IP address. I don't know what the .13 is supposed to be.
How do I get that IP address on the client?