RUT955 Disable Redirection to Https via SSH

Hello,
is its possible to deactivate the function “Redirect to HTTPS” via SSH access.

There was made a port forward rule on Port 443 which does not allow to acces the webinterface anymore.

If yes, can you please describe how to do it.

Thank you in advance.

Hello,

Yes, it is possible to change the rule settings on and off for a device using the CLI command. If you have already created a specific rule or are using the default rule, you can modify its behavior by adjusting certain parameters. Here’s an example of how you can achieve this:

1. Check Firewall Rule: First, you need to identify the specific firewall rule that you want to enable or disable. To do this, open the terminal or SSH into your system and list the current firewall rules using a command such as:

cat /etc/config/firewall
Screenshot 2023-08-07 090828

This command will display the existing rules, including their statuses (enabled or disabled).
Option enabled ‘0’ means disabled, if you want to enable it we need to change this to ‘1’ and vice versa.

2. Edit the Rule using vi: Once you’ve identified the rule you want to modify, you can use the vi text editor to make the necessary changes. For example, if you want to enable or disable a rule by editing the /etc/config/firewall file, use the following command:
vi /etc/config/firewall

The vi editor will open the file for editing

3. Change the Parameter: In the vi editor, navigate to the specific line corresponding to the rule you want to modify. Look for the parameter that controls whether the rule is enabled or disabled. It is usually represented by “1” for enabled and “0” for disabled. Modify the parameter according to your needs: set it to “1” to enable the rule or “0” to disable the rule.

4. Save and Exit: After making the necessary changes, save the file and exit the vi editor. Press Esc key to ensure you are in command mode, then type :wq and press Enter. This will write the changes to the file and quit the editor.

5. Restart Firewall: To apply the changes, you need to restart the firewall service, you can typically restart the firewall with the following command:
/etc/init.d/firewall restart

By following these steps, you can effectively enable or disable a specific firewall rule and apply the changes by restarting the firewall service. Additionally, exercise caution while modifying firewall rules as incorrect configurations can potentially compromise the security of your system.

Thanks and regards.

This topic was automatically closed after 15 days. New replies are no longer allowed.