Community discussions

MikroTik App
 
kefiroid
just joined
Topic Author
Posts: 6
Joined: Thu Nov 27, 2008 10:51 am

port forward and load balancing

Thu Nov 27, 2008 11:24 am

Hi all!

The port forward function doesn't work since I've made load balancing according this document

Till this everything worked fine.

As the bandwidth of my wan channels isn't equal (8 Mbps for wan and 24 Mbps for wan_ppp) I've changed some Nth parameters in mangle rules. Here they are:
/ ip firewall mangle 

add chain=prerouting in-interface=lan connection-state=new nth=3,1,0 action=mark-connection new-connection-mark=wan passthrough=yes comment="" disabled=no 

add chain=prerouting in-interface=lan connection-mark=wan action=mark-routing new-routing-mark=wan passthrough=no comment="" disabled=no 

add chain=prerouting in-interface=lan connection-state=new nth=3,1,1 action=mark-connection new-connection-mark=wan_ppp1 passthrough=yes comment="" disabled=no 

add chain=prerouting in-interface=lan connection-mark=wan_ppp1 action=mark-routing new-routing-mark=wan_ppp passthrough=no comment="" disabled=no 

add chain=prerouting in-interface=lan connection-state=new nth=3,1,2 action=mark-connection new-connection-mark=wan_ppp2 passthrough=yes comment="" disabled=no

 add chain=prerouting in-interface=lan connection-mark=wan_ppp2 action=mark-routing new-routing-mark=wan_ppp passthrough=no comment="" disabled=no 

add chain=prerouting in-interface=lan connection-state=new nth=3,1,3 action=mark-connection new-connection-mark=wan_ppp3 passthrough=yes comment="" disabled=no 

add chain=prerouting in-interface=lan connection-mark=wan_ppp3 action=mark-routing new-routing-mark=wan_ppp passthrough=no comment="" disabled=no


And here are my port forwarding rules:
ip firewall nat add chain=dstnat dst-address=217.y.y.y protocol=tcp dst-port=4682 \ action=dst-nat to-addresses=172.16.1.100 to-ports=4682 comment="uTorrent \ port" disabled=no
ip firewall filter add chain=forward in-interface=wan_ppp dst-address=172.16.1.100 protocol=tcp dst-port=4682 \ action=accept comment="" disabled=no
The 217.y.y.y address is assigned to the wan_ppp. And port forward should work only from this interface, but it doesn't.

Help me, please!