Sziasztok
Adott egy VPN szerver, ahol az userek közös kulcs mellett egyedi user-pass párossal lépnek be.
Az ezt biztosító sorok:
username-as-common-name
auth-user-pass-verify "/etc/openvpn/vpn_auth" via-file
A script csak user-pass párt kapja meg, mást nem. Rá lehet beszélni, hogy még engedélyezés előtt feladja a forrás IP-t is?
Cél: SQL-ben az user neve mellett ott legyen az engedélyezett forrás IP-k sora, mint plusz engedélyezési faktor.
Köszönöm!
- 738 megtekintés
Hozzászólások
--client-connect script
Run script on client connection. The script is passed the common name and IP address of the just-authenticated client as environmental variables (see environmental variable section below). The script is also passed the pathname of a not-yet-created temporary file as $1 (i.e. the first command line argument), to be used by the script to pass dynamically generated config file directives back to OpenVPN.
If the script wants to generate a dynamic config file to be applied on the server when the client connects, it should write it to the file named by $1.
See the --client-config-dir option below for options which can be legally used in a dynamically generated config file.
Note that the return value of script is significant. If script returns a non-zero error status, it will cause the client to be disconnected.
De akár --up vagy --route-up is működhet.
- A hozzászóláshoz be kell jelentkezni