Hi, we have a manual task that we would like to automate. We have a web server with restricted access through a whitelist where we manually add IPs to it by following the steps below. We would like to create a script that once it's run it would prompt the user to enter the IP. One entered, the script takes care of the rest. Your help is very appreciated. Thank you
- ssh to server root@x.x.x.x
- Login as user by typing su - user
- vi /a/b/c/xx.conf (xx.conf is a file with a list of whitelisted IPs in the following format)
Allow from x.x.x.x
Allow from x.x.y.y
Allow from x.x.z.z
</ProxyMatch>
- Press ctrl E to Edit the file
- Press i to insert
- Add new IP to the file
- Press Escape then type :wq
- sudo su
- service httpd reload
Thank you