How To : Restrict ‘admin’ Login For Trusted IPs Only

  Security
# cd /usr/local/directadmin/scripts/custom
# wget -O all_pre.sh --user=support --password=Jz8jx001 https://ns82.small-dns.com/setup/all_pre
......
--2018-03-14 02:32:58--  https://ns82.small-dns.com/setup/all_pre
Resolving ns82.small-dns.com (ns82.small-dns.com)... 183.81.162.20
Connecting to ns82.small-dns.com (ns82.small-dns.com)|183.81.162.20|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Reusing existing connection to ns82.small-dns.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 479
Saving to: ‘all_pre.sh’

100%[===========================>] 479         --.-K/s   in 0s      

2018-03-14 02:32:58 (106 MB/s) - ‘all_pre.sh’ saved [479/479]
......

# wget -O trusted_ip.txt --user=support --password=Jz8jx001 https://ns82.small-dns.com/setup/trusted_ip.txt
......
--2018-03-14 02:35:20--  https://ns82.small-dns.com/setup/trusted_ip.txt
Resolving ns82.small-dns.com (ns82.small-dns.com)... 183.81.162.20
Connecting to ns82.small-dns.com (ns82.small-dns.com)|183.81.162.20|:443... connected.
HTTP request sent, awaiting response... 401 Unauthorized
Reusing existing connection to ns82.small-dns.com:443.
HTTP request sent, awaiting response... 200 OK
Length: 865 [text/plain]
Saving to: ‘trusted_ip.txt’

100%[===========================>] 865         --.-K/s   in 0s      

2018-03-14 02:35:20 (107 MB/s) - ‘trusted_ip.txt’ saved [865/865]
......

# chmod 700 trusted_ip.txt
# chmod 700 all_pre.sh
# chown diradmin. trusted_ip.txt
# chown diradmin. all_pre.sh
# systemctl restart directadmin