How To Load balance traffic of Mail server hosted in the Internal network and redirect traffic over preferred Interface How To Configure load sharing and redirect mail server traffic over preferred Gateway Applicable to versions 9.5.3 build 14 or above This article describes a detailed configuration example that demonstrates how to load balance traffic of mail server hosted internally and redirect traffic over preferred interface when multiple WAN links terminating on Cyberoam. Configuration steps are provided assuming that you are using factory default settings of the appliance. If your appliance is not using factory defaults, you can use IP address as per your requirement. Article covers how to Create virtual host Create firewall rule to allow the inbound traffic Configure source based routing to route the request from each private IP address through a particular gateway Sample schema Consider the hypothetical network where Cyberoam is deployed with two WAN interfaces and mail server is having MX records pointed to both the WAN IP addresses. Policies are to be configured to direct traffic to a specific interface. Throughout the article we will use the network parameters displayed in the below given network diagram. Network components Mail server MX IP address IP address (Internal) 203.88.135.208 10.0.0.1 (Mapped) 204.88.135.192 10.0.0.2 (Mapped)
Configuration Entire configuration is to be done from Web Admin Console unless specified. Step 1: Create virtual host that maps WAN IP 203.88.135.208 to internal mail server 10.0.0.1 Go to Firewall Virtual Host Create and create virtual host with the parameters as specified in sample schema
Step 2: Create virtual host that maps WAN IP 204.88.135.192 to internal mail server 10.0.0.2 Go to Firewall Virtual Host Create and create virtual host with the parameters as specified in sample schema
Step 3: Loopback firewall rule Once the virtual host is created successfully, Cyberoam automatically creates a loopback firewall rule for the zone of the mapped IP address. Loopback firewall rule is created for the service specified in virtual host. If port forwarding is not enabled in virtual host then firewall rule with All Services is created. For our example, LAN to LAN firewall rule is created as virtual host (mapped IP address) belongs to LAN interface subnet. Check creation of loopback rule from Firewall Manage Firewall
Step 4: Add Firewall rules for Virtual host (created in step 1) Go to Firewall Create Rule and create two firewall rules with the parameters as displayed in the below given screens. Create WAN to LAN firewall rule with the virtual host (created in Step 1) as the Destination host. This rule will allow external host (from the Internet) to access the mail server with the IP 203.88.135.208. Step 5: Add Firewall rules for Virtual host (created in step 2) Go to Firewall Create Rule and create two firewall rules with the parameters as displayed in the below given screens. Create WAN to LAN firewall rule with the virtual host (created in Step 1) as the Destination host. This rule will allow external host (from the Internet) to access the web server with the IP 204.88.135.192.
Step 6: Define source based routing To redirect traffic over preferred interface, add IP address to the Gateway whose request you want to route through the gateway. To configure outgoing interface as 203.88.135.208 for traffic from 10.0.0.1, add 10.0.0.1 to Gateway1 and 204.88.135.192 for traffic from 10.0.0.2, add 10.0.0.2 to Gateway2 Go to System Gateway Manage Gateway and add IPs to the respective gateways.
Document version -1.0-25/08/2008