#!/bin/sh
ext_ip="$(nvram get wan_ipaddr)"
ext_port=3389
int_ip=192.168.1.100
int_port=3389
proto=tcp
iptables -t nat -I PREROUTING -p $proto -d $ext_ip --dport $ext_port \
-m time --timestart 20:00 --timestop 00:00 --weekdays Mon,Tue,Wed,Thu,Sun --kerneltz \
-j DNAT --to $int_ip:$int_port
iptables -t nat -I PREROUTING -p $proto -d $ext_ip --dport $ext_port \
-m time --timestart 00:00 --timestop 08:00 --weekdays Mon,Tue,Wed,Thu,Fri --kerneltz \
-j DNAT --to $int_ip:$int_port
exit 0
That is excellent! Really appreciate it. I am assuming this won't show in the UI/nvram, right?
We use essential cookies to make this site work, and optional cookies to enhance your experience.