7573 questions

9027 answers

14571 comments

11783 members

0 votes
111 views 11 comments
by
I would like to assign traffic based on destination/source IP:Port to a different wwan interface on the RUTX12. Is this possible to do via iptables rules running directly on the router? Any example of how this could work would be very helpful.
by
I have RMS subscription on the router - would you like to take a look?

1 Answer

0 votes
by
Hi,

You can find instructions on how to split traffic through two different active modems here:

https://community.teltonika-networks.com/22084/would-like-port-specifically-mobile-sim1-other-ports-share?show=22084#q22084

You can use these instructions the same way with Wired WAN instead of the second modem if you wish.

EB.
by
Thanks! I want to do port-based routing/filtering so VLAN tagging might not work.

Does the RUTX12 support full Linux iptables? Then I could add traffic-specific rules.
by
Okay, in this case there are policy routing instructions here: https://community.teltonika-networks.com/23917/rutx12-problem-policy-routes?show=23917#q23917

Here you will use firewall marks and iptables rules together to redirect certain traffic by specific IP and port.

EB.
by

Thanks for this. I followed your instructions on that link but still do not see the policy routing working. I checked by looking at the Bytes sent/received on the second interface. 

My setup looks as below:

by
Could you post screenshots of the configurations you've done followed by instructions? I'm interested in what IP's you're trying to policy route to and how do your iptables look.

EB.
by

I could explain what I've done. But first, the issue: All traffic goes only on one wwan interface. The second is unused. Both interfaces are active and connected.

The IPs of PC 1 and 2 are fixed and on the same subnet. PC1 has IP .50 and is connected to the RUTX12 (as shown in figure) Below are screenshots of the router configs. When I send traffic on port 7000 or 8000, it should go through wwan1 but evreything goes through wwan0. I check this by monitoring traffic on both interfaces.

by
Could you show other routing tables too and their stativ ipv4 routes?

Also, you could try checking if maybe your firmware is not updated to the latest version.

EB.
by

Attached the other two Routing Tables. 

Firmware version is RUTX_R_00.02.06

by
Try to eliminate ipv4 gateway from all the tables static ipv4 routes and then see if it works. Gateway is only needed if its wired wan connection.

EB.
by
Hi, I confirm that this doesn't work
by
Would you be available for a remote session tomorrow? I would look into your configuration and run some tests to see if it really doesn't work.

If you're available for it - please send me a private message with the time that would work for you between 8 AM and 5 PM in Lithuanian time, I will reply to you with more details afterwards.

EB.