how to redirect http traffic to another gateway on Mikrotik
what your asking for is not clear
here is a example of a dst nat rule . if this is what your looking for ![]()
ip firewall nat add dst-address=(WAN-IP) dst-port=80 action=dst-nat to-addresses=(LAN-IP-WEBSERVER) to-ports=80
Hi,
if I understood you have two wan ports on MKT (WAN1, WAN2), WAN1 is default route in our scenario, WAN2 will be used for HTTP traffic which will be coming from local computers.
- we must mark web traffic which is coming to mikrotik (ip firewall mangle)- put that rule on the top of the mangle (change in-interface LAN with your real local interface)
/ip firewall mangle
add chain=prerouting action=mark-routing new-routing-mark=web_traffic passthrough=no protocol=tcp dst-address-type=!local in-interface=LAN dst-port=80
- we must create default route for that traffic (in our case it is WAN2)
/ip route
add comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=WAN2 routing-mark=web_traffic scope=30 target-scope=10
ok this is what I want, but how can I test if it really works
thanks
you can see in torch, or you can open the browser and go to www.whatismyip.com
if your address is ip address from WAN2 then it works
is not work
ip firewall mangle export
ip route export
copy/pase the config
is not work please help me this my configuration
Wan1 192.168.1.2/24 gateway1 192.168.1.1
Wan2 192.168.5.25/24 Gateway2 192.68.1.20
lan 192.168.100.254/24
please
ok, first thing, your wan2 has wrong gateway, it`s not in the same network as your wan2 interface…
is 192.168.5.20 help to configure my router
good thanks you !!! ![]()