hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Hosting Security and Technology : Routing Advice needed
Reply

Hosting Security and Technology Configuring and optimizing web hosting servers and operating systems, developing administration scripts, building servers, protecting against hackers, and general security (SSL certificates, etc.)
Forum Jump

Routing Advice needed

Reply Post New Thread In Hosting Security and Technology Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 02-21-2007, 07:38 AM
JasonF JasonF is offline
Newbie
 
Join Date: Feb 2007
Posts: 8
Question

Routing Advice needed


I am quickly running out of hair..plesk help!

I have a linux router with 2 external and 2 internal ports.

Each port needs to route traffic to one of the internal ports,
and the internal traffic between the 2 internal ports
should not go out the external ports.

The IPS on the internal networks are global. ie. no NAT required.

I think what I need is this..

$ext_net1 = external nework IP/MASK 1
$EXT_IP1 = ip of external interface 1
$ext_net2 = external nework IP/MASK 2
$EXT_IP2 = ip of external interface 2
$int_net1 = internal network IP/MASK 1
$int_net2 = internal network IP/MASK 2

ip route add $ext_net1 dev eth0 src $EXT_IP1 table 1
ip route add default via $ext1_gw table 1
ip route add $int_net1 dev eth1

ip route add $ext_net2 dev eth2 src $EXT_IP2 table 2
ip route add default via $ext2_gw table 2
ip route add $int_net1 dev eth3

ip rule add from $int_net1 table 1
ip rule add from $int_net2 table 2


Am I missing something?

Thanks.

Reply With Quote


Sponsored Links
  #2  
Old 02-21-2007, 07:47 AM
dkitchen dkitchen is offline
Managed Hosting Expert
 
Join Date: Jan 2004
Location: North Yorkshire, UK
Posts: 4,163
I'm not familiar with Linux routing, only Cisco/Juniper but what you're doing does seem overly complicated.

All you should require is:

ip route 0.0.0.0 0.0.0.0 1.1.1.1 (where 1.1.1.1 is your gateway on the internet side NIC)
ip route 1.1.2.0 255.255.255.0 eth1 (where 1.1.2.0/24 is your first block on 2nd nic)
ip route 1.1.3.0 255.255.255.0 eth2 (where 1.1.3.0/24 is your second block on third nic).

(The syntax may be different).

Dan

__________________
█ Dan Kitchen | Technical Director | Razorblue
█ ddi: (+44) (0)1748 900 680 | e: dkitchen@razorblue.com
█ UK Intensive Managed Hosting, Clusters and Colocation.
█ HP Servers, Cisco/Juniper Powered BGP Network (AS15692).


Reply With Quote
  #3  
Old 02-21-2007, 01:22 PM
flaggg flaggg is offline
Junior Guru Wannabe
 
Join Date: Nov 2006
Posts: 64
If you're going to use tables, I believe you are required to use iptables to flag the packets you want to send to the correct table. I say this because I have a similar configuration (2 WAN, 1 LAN) at home and I use iptables to flag packets to the correct table for the WAN.

Are you bonding/balancing/failing over your external links? If so, you might as well pull up http://lartc.org/howto/ and memorize it. If you're not, you should be able to route all your traffic out the external link with a default route and set up normal routes like Dan said for each subnet and specify each NIC it goes to.

You might also need to disable rp_filter (not sure on this) and make sure you've enabled routing in sysctl.

Reply With Quote
Sponsored Links
  #4  
Old 02-21-2007, 03:38 PM
JasonF JasonF is offline
Newbie
 
Join Date: Feb 2007
Posts: 8
Actually I already looked at the advanced routing page...
4.2 Routing for multiple uplinks/providers

But I believe this is changing the source address for outgoing traffic.
The main issue is that traffic MUST go out the same interface it came in on.

RazorBlue - Dan's suggestion is only inbound as all outgoing traffic will go out the default gateway. The gateway needs to be defined according to the source IP. I don't believe we need to flag the packets for this. Just some sort of tables/rules. However, I do know it is possible with iptables but would like to avoid the overhead of mangle.

Reply With Quote
Reply

Related posts from TheWhir.com
Title Type Date Posted
Heroku Describes Ruby on Rails Application Performance Issues Web Hosting News 2013-02-20 13:00:51
Go Daddy Identifies Causes of September 10 DNS Failure in Detailed Postmortem Post Web Hosting News 2012-11-12 13:49:14
Yottaa Receives Patent for Web Performance Optimization, Traffic Processing Web Hosting News 2012-02-28 16:01:13
Former Juniper Networks Execs Join Cisco Service Provider Sales Team Web Hosting News 2011-08-05 20:47:59
Web Host Intermedia Launches “Virtual Receptionist” Service Web Hosting News 2011-06-13 15:40:10


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes
Postbit Selector

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

Forum Jump
Login:
Log in with your username and password
Username:
Password:



Forgot Password?
Advertisement:
Web Hosting News:



 

X

Welcome to WebHostingTalk.com

Create your username to jump into the discussion!

WebHostingTalk.com is the largest, most influentual web hosting community on the Internet. Join us by filling in the form below.


(4 digit year)

Already a member?