Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this works only if you have two wan ports on MIKROTIK (WAN1, WAN2), WAN1 is default route in our scenario, WAN2 will be used for HTTP traffic which will be coming from local computers.
- send only http "port80"
- /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
- /ip route
- add comment="port80" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=WAN2 routing-mark=web_traffic scope=30 target-scope=10
- /ip firewall nat
- add action=masquerade chain=srcnat disabled=no out-interface=WAN2
- send only https "port 443"
- /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=443
- /ip route
- add comment="port443" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=WAN2 routing-mark=web_traffic scope=30 target-scope=10
- /ip firewall nat
- add action=masquerade chain=srcnat disabled=no out-interface=WAN2
- send http & https"port 80 & port 443"
- /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,443
- /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
- /ip firewall nat
- add action=masquerade chain=srcnat disabled=no out-interface=WAN2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement