ha-asusrouter
ha-asusrouter copied to clipboard
[Feature] Change port forward settings
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
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
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.
Hi @Salvora, would you mind posting your custom script to turn on / off port forwarding or a link to it?
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
Hey, I am happy to announce, that the requested feature is already in the development/testing state. So it will definitely be implemented 📢
Hey. The feature is already available in the new 0.19.0 version. Check it out
Hi, I can confirm that on/off is working fine but the switch state itself is always "turned off".
@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!