ha-asusrouter icon indicating copy to clipboard operation
ha-asusrouter copied to clipboard

[Feature] Change port forward settings

Open Tekno-man opened this issue 2 years ago • 2 comments

The problem

Hi, I just stumbled upon your integration and it looks great, so many more features than the standard HA asuswrt one. I'm not sure what the limitations are of the api you are using but wondered if it gave you access to different settings specifically the port forward settings? Ultimately wanting to change port forward settings through automations and update the source IPs through HA. I looked at IP tables but doesn't seem possible on standard firmware.

Specific device(s)?

No response

Firmware type

No response

Tekno-man avatar Jun 15 '22 12:06 Tekno-man

Hello, @Tekno-man,

Thank you for your feedback! 👍🏻

I will check if port forwarding settings can be implemented. But cannot promise this before the weekend

Vaskivskyi avatar Jun 15 '22 20:06 Vaskivskyi

I think it is possible to add an on/off switch but configuring the details might be a little too hard. I use a custom script to turn on and off the port forwarding if I notice suspicious activity from the Home Assistant frontend.

Salvora avatar Oct 30 '22 15:10 Salvora

Hi @Salvora, would you mind posting your custom script to turn on / off port forwarding or a link to it?

iMarkus avatar Feb 01 '23 12:02 iMarkus

For turning on

#!/bin/sh
nvram set vts_enable_x=1
nvram commit
service restart_firewall
sleep 5

For turning off:

#!/bin/sh
nvram set vts_enable_x=0
nvram commit
service restart_firewall
sleep 5

This one for querying port forwarding status:

#!/bin/sh
nvram get vts_enable_x

Salvora avatar Feb 01 '23 13:02 Salvora

Hey, I am happy to announce, that the requested feature is already in the development/testing state. So it will definitely be implemented 📢

Vaskivskyi avatar Feb 05 '23 09:02 Vaskivskyi

Hey. The feature is already available in the new 0.19.0 version. Check it out

Vaskivskyi avatar Feb 05 '23 19:02 Vaskivskyi

Hi, I can confirm that on/off is working fine but the switch state itself is always "turned off".

iMarkus avatar Feb 07 '23 15:02 iMarkus

@iMarkus, hey. Can you please open a new issue with the steps on how to reproduce the problem and info about your device and HA log errors(if any)? Thanks!

Vaskivskyi avatar Feb 07 '23 16:02 Vaskivskyi