How use OpenVPN static key in inline mode (<secret>)
Instead of using a directive like
secret static.key
in your OpenVPN config, you can also use an inline key:
<secret>
// Copy & paste OpenVPN static key here !!
</secret>
A full example OpenVPN config looks like this:
nobind
persist-key
cipher AES-256-CBC
dev tun
ifconfig 10.92.11.2 10.92.11.1
keepalive 10 60
port 1194
proto udp4
remote mydomain.net
resolv-retry infinite
route 192.168.9.0 255.255.255.0
secret /dev/urandom
verb 5
auth SHA512
<secret>
#
# 2048 bit OpenVPN static key
#
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
97aae54ce3e22128c0efba9043a6ba07
03dc5a68399a7e7f65ab6d7cdc390729
a1f72e665fe7cf300edccb1555df56ff
3d2386942c7b78cf1676c5734834ea18
2c2ba33523e3278a84efe168dd160fd4
3c0205a0335765b80881cfb915e9b3de
097a63ee5321a31540c51a628ab95d0e
4f40657351125526120a1a83ec8af043
3ddbb859a6c8e2d36797ba5a983dd223
5ecea38941b8af992492887e6d361ccc
a41f1a3993f2c24011b2a3026b71c82d
12d301cb346de19dcaa550886b5dd0c0
9b4d6bd0ca7415a42e4ffa10fe39659e
e9ad0ff1edcfa2d62c3e3db2834f0da5
fe8e4c332325a195c537551a6f1a0ff5
c5bd5d7b038c7a9df9c8d28cb33ef4b0
-----END OpenVPN Static key V1-----
</secret>