Hello to all
who to open port from wan to lan
example uci code.
uci add firewall redirect
uci set firewall.@redirect[-1].config redirect
uci set firewall.@redirect[-1].option target 'DNAT'
uci set firewall.@redirect[-1].option src 'wan'
uci set firewall.@redirect[-1].option src_ip '{0}'", externalip
uci set firewall.@redirect[-1].option dest 'lan'
uci set firewall.@redirect[-1].option proto 'tcp udp'
uci set firewall.@redirect[-1].option dest_ip '{0}'", ipRusers
uci set firewall.@redirect[-1].option dest_port '{0}',LanPort
uci set firewall.@redirect[-1].option name 'Acc-{0}-{1}'",LanIP,externalip
uci set firewall.@redirect[-1].option src_dport '{0}'",ExternalPort
uci commit firewall
service firewall restart
on Standart Linux are more simple.
iptables -t nat -A PREROUTING -s {2} -i ens33 -p tcp --dport {1} -j DNAT --to-destination {0}:{3}", iplancompu, externalport, externalip,Internalport
is posible make a easy comand for redirect?