Ok so I revisited my code after giving it a rest for a few days and made some progress on my original idea of creating an Alias called "Whitelist" and then programatically updating that list by pushing the config.xml file from the server, updating the Whitelist Alias, then pulling the config.xml file back to the firewall and reloading the config….
The issue I ran into was that running rm/tmp/config.cache would not apply the changes…
Today I found that if you run both rm/tmp/config.cache and then /etc/rc.filter_configure it will apply the rule!
Two questions…
1. Are there any unforeseen issues with running the /etc/rc.filter_configure script… it looks like it is pretty straight forward.. and I did not see anything obvious…
2. Is there any way to preflight the config.xml BEFORE is run the commands to reload it? Like you can with Apache?
I am running all kinds of safety checks in my script that updates the config.xml.. but I want to be as safe as I can be…
For anyone interested here are more details…
I am running coldfusion on a box that is open to all Ip address on the WAN.
1. I have a page on that server that requires the agent to authenticate to.
2. The coldfusion script looks at the users IP and determines if it is a new one.
3. If it is a new one it updates a database for that users profile and sets a flag that tells a scheduled task (cron job) that a new IP needs to be added to the whitelist.
4. The scheduled task runs every five minutes and looks for the update flag… if it sees it it runs…
Here is what it does….
Gets the new IP whitelist from the server…
uses putty to run a .sh script on the firewall that FTPs the config to the coldfusion server (all done inside the LAN)
Replaces the previous whitelist with the new whitelist
uses putty to run a .sh script on the firewall to ftp the config.xml file back to the firewall server
runs a .sh script to reload the config..