Step 1: Access the Terminal
Open a terminal window on your system. You can usually find the terminal application in your system's applications menu or by searching for "Terminal" in the search bar.Step 2: Open Nano
Type the following command into the terminal and press Enter:
Code:
nano /usr/local/directadmin/data/admin/ip_whitelist
This command opens the Nano text editor and creates a new file named ip_whitelist if it doesn't exist already.
Step 3: Paste Your IP Address
- Copy your IP address to the clipboard. You can do this by selecting your IP address and using the keyboard shortcut Ctrl + C or by right-clicking and selecting "Copy".
- In the Nano text editor, right-click anywhere within the terminal window to paste your IP address. Nano should automatically paste the contents of your clipboard.
Step 4: Save and Exit Nano
To save the changes you've made and exit Nano, follow these steps:- Press Ctrl + O to write the changes to the file.
- Nano will prompt you for the filename to write to. Press Enter to confirm the filename.
- Press Ctrl + X to exit Nano.
Step 5: Verify
To verify that your IP address has been added to the whitelist, you can display the contents of the ip_whitelist file. Type the following command into the terminal and press Enter:
Code:
cat /usr/local/directadmin/data/admin/ip_whitelist
This command will display the contents of the ip_whitelist file, including your IP address.
Step 6: Close the Terminal
Once you've verified that your IP address has been successfully added to the whitelist, you can close the terminal window.That's it! You've successfully whitelisted your IP address by creating the ip_whitelist file using the Nano text editor. This should help ensure that your IP address is never blacklisted.