source: trunk/lvs/debian/config/etc/network/if-up.d/iptables @ 1184

Last change on this file since 1184 was 1184, checked in by quentin, 13 years ago
Change the LVS configuration to use the same source hashing; FWM 1 is the same as before, FWM 2 is Apache-bound traffic, and FWM 3 is Postfix-bound traffic
  • Property svn:executable set to *
File size: 1.1 KB
2## Joe Presbrey <>
[1184]3## Quentin Smith <>
[210]4## SIPB Scripts LVS Firewall marks
6iptables -F -t mangle
[1184]8# Create a table for regular scripts hosts
9iptables -t mangle -N scripts 2>/dev/null || :
12iptables -A PREROUTING -t mangle -d -j scripts
[1184]14iptables -A PREROUTING -t mangle -d -j scripts
16iptables -A PREROUTING -t mangle -d -j scripts
[1184]18# Send Apache-bound traffic to FWM 2 (load-balanced)
19iptables -A scripts -t mangle -m tcp -m multiport -p tcp --dports 80,443,444 -j MARK --set-mark 2
20# Send SMTP-bound traffic to FWM 3 (load-balanced)
21iptables -A scripts -t mangle -m tcp -p tcp --dport 25 -j MARK --set-mark 3
22# Send everything else to FWM 1 (primary)
23iptables -A scripts -t mangle -m mark --mark 0 -j MARK --set-mark 1
[1184]25# is special because its SMTP needs to always go to the primary (FWM 1)
26iptables -A PREROUTING -t mangle -m tcp -m multiport -p tcp -d --dports 80,443,444 -j MARK --set-mark 2
[577]27iptables -A PREROUTING -t mangle -m mark --mark 0 -d -j MARK --set-mark 1
Note: See TracBrowser for help on using the repository browser.