So, I was playing around with ChatGPT’s o1 and 4o versions, and I mainly use it for coding. Since I’m not an expert programmer I only have a basic knowledge and can’t write a script on my own the power of AI has finally allowed me to achieve my dream. I’m having a lot of fun with it!
However, while experimenting, I realized that it doesn’t handle ASCII art very well. Whenever I ask it to generate a script with ASCII art, it’s usually a mess either it’s ugly, or it works but has mistakes in it. This happen most of the time, though. Is this a recurring problem, or am I just entering my prompts incorrectly? here is my prompt:
Create a robust and user-friendly script to secure my VPS running Debian 11. The script must meet the following criteria:
- General Functionality:
- Update the system and enable automatic updates.
- Create a new user with limited sudo privileges.
- Configure a firewall (UFW), allowing the user to specify custom ports (default to 22, 80, and 443).
- Install and configure Fail2Ban for added security.
- Enable and configure a swap file with at least 6GB.
- Install and configure a malware scanner.
- Include regular maintenance options.
- Interactive Features:
- Prompt the user for input where applicable (e.g., custom firewall ports).
- Offer a main menu that users can access anytime by typing ‘MENU’.
- Clear the terminal screen before redisplaying the menu or making major changes.
- Ensure all tasks return to the main menu once completed.
- Error Handling:
- Check if tasks have already been completed to avoid redundancy.
- Handle potential errors gracefully and display meaningful error messages.
- Provide confirmation messages for successful operations.
- Aesthetic Features:
- Display an ASCII art banner with the word “DEBIAN11” prominently at the top of the script.
- Use colored output to enhance readability (e.g., green for success, red for errors, blue for prompts).
- Customization:
- Allow the user to choose custom ports for the firewall.
- Enable and disable individual features via the menu.
- Optional Enhancements:
- Implement logging to track changes and actions.
- Offer additional options for security (e.g., SSH hardening, disabling root login).
Act as an experienced programmer and server administrator, ensuring the script adheres to best practices and is optimized for ease of use. The script should be modular and maintainable, allowing for future enhancements.