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
3,023 views 1 comments
by
Hi,

I am trying to configure more than 100 rules in the Port Forwarding table in the Firewall section of the Teltonika RUT950. I was wondering if this is possible to be done using the command line to save time as the Web Interface takes time to load each rule.

Regards,

Alejandro

2 Answers

0 votes
by anonymous

Hello,

You can do so by using CLI/SSH and editing config file.

Firewall config file can be found here: /etc/config/firewall

Run this command to edit it: vi /etc/config/firewall

Press i to start editing, when you are done press ESC to stop editing, the write :wq to exit

The config for port forwading should look something similar to this:

config redirect
        option enabled '1'
        option target 'DNAT'
        option src 'wan'
        option dest 'lan'
        option proto 'tcp udp'
        option src_dport '1111'
        option dest_ip '192.168.1.125'
        option dest_port '2222'
        option name 'Test'
 

Once you have made the changes run the following command: /etc/init.d/firewall restart

by anonymous

I spend one hour trying to understand what was wrong on firewall rules (RUT230 firmware RUT2XX_R_00.01.12.3), I was applying rules using "SAVE" button on "Firewall - Traffic Rules" page, then waiting for firewall restart and testing firewall rule.
I couldn't access to device webpage behind nat, I supposed wrong firewall rule.
Restarted firewall through /etc/init.d/firewall restart command in console (instead button on webpage) and webpage suddenly available.
Confused....

0 votes
by anonymous

Hi Alejandro.

Up to now we don't have a procedure for that but as our roots are taken from OpenWRT, you can use the following examples:

https://openwrt.org/docs/guide-user/firewall/firewall_configuration

keep in mind that this hasn't been tested by us yet. Try it and please leave us some feedback if you need.

Regards.