WAN IP: (ISP xDSL modems, we can't make the RG750 pppoe as the modems/routers are locked down)
ether1 : 10.0.0.100
ether2 : 10.0.1.100
LAN IP
ether1 : 10.10.0.100
1. We also have an internal email and webserver on 10.10.0.250 which needs to be accessible over WAN1 and WAN2, on ports (21,25,80,110,443)
2. Out going mail goes to 2 different ISP's so basically if trying to deliver mail on ISP1(IP:x.x.x.x) traffic must go through WAN1 and for ISP2(IP:x.x.x.x) WAN2
3. Failover, if 1 link should fail traffic should failover to the other as we can't control the ISP modems the gateway-check can't help, we need to actually check against the ISP's gateway 2 hops away.
All inbound traffic must be FIRE-WALLED so traffic is block except for the ports in 2. are forwarded to the internal servers.
All help would be appreciated, even better if descriptions are added to why it's done that way.
Code: Select all
/ip address
add address=10.10.0.1/24 broadcast=10.10.0.255 comment=LAN disabled=no interface=ether5 network=10.10.0.0
add address=10.0.0.100/24 broadcast=10.0.0.255 comment=LinkSys disabled=no interface=ether1 network=10.0.0.0
add address=10.0.1.100/24 broadcast=10.0.1.255 comment=NetGear disabled=no interface=ether2 network=10.0.1.0
/ip route
add check-gateway=ping comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.0.0.1 routing-mark=GW1 scope=30 target-scope=10
add comment="" disabled=no distance=10 dst-address=0.0.0.0/0 gateway=10.0.1.1 routing-mark=GW1 scope=30 target-scope=10
add check-gateway=ping comment="" disabled=no distance=1 dst-address=0.0.0.0/0 gateway=10.0.1.1 routing-mark=GW2 scope=30 target-scope=10
add comment="" disabled=no distance=10 dst-address=0.0.0.0/0 gateway=10.0.0.1 routing-mark=GW2 scope=30 target-scope=10
/ip firewall connection tracking
set enabled=yes generic-timeout=10m icmp-timeout=10s tcp-close-timeout=10s tcp-close-wait-timeout=10s tcp-established-timeout=1d tcp-fin-wait-timeout=10s tcp-last-ack-timeout=10s \
tcp-syn-received-timeout=5s tcp-syn-sent-timeout=5s tcp-syncookie=no tcp-time-wait-timeout=10s udp-stream-timeout=3m udp-timeout=10s
/ip firewall filter
add action=drop chain=forward comment="" connection-state=invalid disabled=no
add action=accept chain=forward comment="" disabled=no dst-address=10.10.0.10 dst-port=3389 protocol=tcp
add action=accept chain=forward comment="" connection-state=established disabled=no
add action=accept chain=forward comment="" connection-state=related disabled=no
add action=drop chain=forward comment="" disabled=no in-interface=ether1
add action=drop chain=forward comment="" disabled=no in-interface=ether2
add action=accept chain=forward comment="" disabled=no
/ip firewall mangle
add action=mark-connection chain=prerouting comment="CM for GW1" disabled=no in-interface=ether5 new-connection-mark=GW1 passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=prerouting comment="CM for GW2" disabled=no in-interface=ether5 new-connection-mark=GW2 passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-connection chain=output comment="CM for GW1 - output" connection-mark=no-mark disabled=no new-connection-mark=GW1 passthrough=yes per-connection-classifier=both-addresses:2/0
add action=mark-connection chain=output comment="CM for GW2 - output" connection-mark=no-mark disabled=no new-connection-mark=GW2 passthrough=yes per-connection-classifier=both-addresses:2/1
add action=mark-connection chain=input comment="CM input GW1" connection-mark=no-mark disabled=no in-interface=ether1 new-connection-mark=GW1 passthrough=yes
add action=mark-connection chain=input comment="CM input GW2" connection-mark=no-mark disabled=no in-interface=ether2 new-connection-mark=GW2 passthrough=yes
add action=mark-routing chain=prerouting comment="RM for GW1" connection-mark=GW1 disabled=no in-interface=ether5 new-routing-mark=GW1 passthrough=yes
add action=mark-routing chain=prerouting comment="RM for GW2" connection-mark=GW2 disabled=no in-interface=ether5 new-routing-mark=GW2 passthrough=yes
/ip firewall nat
add action=masquerade chain=srcnat comment="Masq for GW1" disabled=no out-interface=ether1
add action=masquerade chain=srcnat comment="Masq for GW2" disabled=no out-interface=ether2
add action=dst-nat chain=dstnat comment="" disabled=no dst-address=10.0.1.100 dst-port=443 protocol=tcp to-addresses=10.10.0.10 to-ports=3389
/ip firewall service-port
set ftp disabled=no ports=21
set tftp disabled=no ports=69
set irc disabled=no ports=6667
set h323 disabled=no
set sip disabled=no ports=5060,5061
set pptp disabled=no