|The login_pre.sh feature is a script that is called before each request (if it exists). The sample script in the versions system describes how to allow one IP. If you wish to allow more than one IP, the script would need to be changed. Note that you can use php if you wish, and connect to an IP database, if you wanted to have a more versatile IP checking system.|
The script below will describe how to create a text file to allow multiple IPs, with an easy-to-edit list.
1) Similar to the sample script, we'll create
/usr/local/directadmin/scripts/custom/login_pre.shin this script, add the code
2) As you may have guessed, the next step is to create the list itself. Edit
/usr/local/directadmin/scripts/custom/ip_list.txtand add 1 IP per line for the IPs that you wish to allow into DA.
3) This last step is optional. If you'd like to edit the ip_list.txt from within DA itself, add it to the edit files:
Admin Level -> File Editor
so that you can edit it through DA.
|I only want my IP to be able to execute Admin level commands|
|Security Questions after DirectAdmin login for additional layer of security.|
© 2018 JBMC Software, Suite 173 3-11 Bellerose Drive, St Albert, AB T8N 1P7 Canada. Mon-Fri 9AM-5PM MST