FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
248 views 0 comments
by anonymous
Hello!
RUTX10, how to configure NAT masquerade using "uci show" ? or another command CLI

1 Answer

0 votes
by anonymous

Hello,

You can try the following commands to configure the rule:

  • uci add firewall redirect
  • uci set firewall.@redirect[-1].name='<Rule_name>'
  • uci set firewall.@redirect[-1].src='lan'
  • uci set firewall.@redirect[-1].src_dport='<Port_number>'
  • uci set firewall.@redirect[-1].target='SNAT'
  • uci set firewall.@redirect[-1].src_dip='<IP>'
  • uci set firewall.@redirect[-1].proto='all'
  • uci set firewall.@redirect[-1].dest='wan'
  • uci set firewall.@redirect[-1].src_ip='<Source_IP>'
  • uci set firewall.@redirect[-1].dest_ip='<Destination_IP>'
  • uci commit
  • /etc/init.d/firewall restart

Replace <> with your data accordingly.

Best regards,