I am trying to redirect network packets with specific destination public IP to go over SIM 2 interface on RUTX12 (192.168.1.1) over the port 80. SIM 1 is used for all other network traffic.
There is only one PC (192.168.1.10) involved with single NIC.
Thanks in advanced.
For this, you can use the failover functionality (mwan3 package).
Navigate to Network → Failover and create a new rule at the bottom. There, add a new failover policy at the bottom and select the interface that you would like to use. At the top of the page, specify protocol, source and destination IP addesses and apply the newly created rule. Save & apply.
On the failover page, drag the new rule to the top of the list.
Now, whenever the protocol, source and destination IP addresses match, the new rule will apply and it will route the packet via the specified interface.
Here’s an example to route 126.96.36.199 via mobile interface:
Ok. I also tried with this someone posted here before forum went down:
Set ipv4 table id on sim interface to 302
Custom firewall rule:
iptables -mangle -I PREROUTING -d $public_ip -p tcp --dport 88 -j MARK --set-mark 22
Added new rule table with same id to 302
Added static rule for rule table with 192.168.11.0 and subnet 255.255.255.0
Added advanced static rule with source subnet set to 192.168.11.11/32 and fw mark to 22.
It seems that traffic flows only in one direction.