LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 08-19-2008, 09:36 AM   #1
smadon
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Rep: Reputation: 0
Load Balancing With 2 ISP on LAN (problem with web site on the Server)


Hi,


I configure my front web Server, which have squid as well to manage now 2 provider.

I follow the procedure from LARTC which after few (LOTS) of headache works fine.
Mostly...

My Script
Code:
## Check :  lartc.org/howto/lartc.rpdb.multiple-links.html
echo "[Configuration for Mutiple Provider]"
# Connection 1 : Lease line
IF1="eth0"
IP1="203.0.0.5"
P1_GW="203.0.0.4"
P1_NET="203.0.0.3/29"
# Connection 2 : ADSL
IF2="eth2"
IP2="10.0.1.2"
P2_GW="10.0.1.1"
P2_NET="10.0.1.0/24"
# Local Network
IF0="eth1"
IP0="10.0.0.1"
P0_GW="10.0.0.2"
P0_NET="10.0.0.0/24"
# Table
T1="201"
T2="202"
# Create Routing tables for eache Provider
echo "Creating Default Routing Table"
ip route add $P1_NET dev $IF1   src $IP1 table $T1
ip route add default via $P1_GW          table $T1
ip route add $P2_NET dev $IF2   src $IP2 table $T2
ip route add default via $P2_GW          table $T2
# Create Main Route
echo "Creating Main Route"
ip route add $P1_NET dev $IF1 src $IP1
ip route add $P2_NET dev $IF2 src $IP2
ip route add $P0_NET dev $IF0 src $IP0
# Set Routing Rules
echo "Creating Routing Rules"
ip rule add from $IP1 table $T1
ip rule add from $IP2 table $T2
ip route add $P0_NET     dev $IF0 table $T1
ip route add $P2_NET     dev $IF2 table $T1
ip route add 127.0.0.0/8 dev lo   table $T1
ip route add $P0_NET     dev $IF0 table $T2
ip route add $P1_NET     dev $IF1 table $T2
ip route add 127.0.0.0/8 dev lo   table $T2
# Creating the Load Balancing
ip route add default scope global nexthop via $P1_GW dev $IF1 weight 1 nexthop via $P2_GW dev $IF2 weight 3
The problem is : This Router/server is my web server as well, which have 2 web site.
From outside if I ping or do a traceroute to my server, sometime he will go from one interface eth0 or the second eth1.

I think I need to restricted the access for my web site (IP : 203.0.0.5) to only from one interfaces, and block traffic between the both.

SO, How can I block traffic from eth2 to eth0 without having impact on the config??


Thanks for your help
Smadon
 
Old 08-21-2008, 01:58 AM   #2
smadon
LQ Newbie
 
Registered: Aug 2008
Posts: 2

Original Poster
Rep: Reputation: 0
ummh :-(

umhhh,
I probably ask it not in the good way, No reply, sorry for that. :-/

I try as well to blog with ipconfig traffic from eth2 to my ip, so I supposse, routers will to their job and redirect to the correct route.

iptables -A INPUT -i eth2 -d 203.0.0.3/29 -j DROP

But still seems to go through :-(


any idea ?
Thanks for your help :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi ISP load balancing Skillz Linux - Networking 8 03-13-2012 01:54 PM
i need help for load balancing setting apache web server gnu_gcc Linux - Server 2 06-23-2008 03:06 PM
Load balancing two isp and two local run_time Linux - Networking 0 01-12-2008 12:15 PM
Need help with Dual ISP load balancing with IPTables daemonik Linux - Networking 2 12-04-2006 11:54 AM
Load balancing for a web site czamora Linux - Software 2 06-12-2006 04:29 PM


All times are GMT -5. The time now is 06:20 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration