LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-16-2012, 02:52 PM   #1
mistral99
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Rep: Reputation: Disabled
routing to multihomed server from LAN


Hi,

I have 2 servers:

ServerA (multihomed)
eth0: 192.168.100.76
eth1: 1.2.3.4 (public ip)

ServerB
eth0: 192.168.100.80

gw for 192.168.100.0/24 is 192.168.100.1 (firewall)

If I use traceroute to ServerA's public ip from ServerB, it goes there in 2 hops, the first one being the gw (firewall):

traceroute 1.2.3.4
1 192.168.100.1
2 1.2.3.4

Can I reach ServerA's public ip directly (in 1 hop)?

On serverB I tried:

ip route add 1.2.3.4/32 via 192.168.100.80 dev eth0

but that didn't help.

Thanks.

Last edited by mistral99; 01-16-2012 at 03:00 PM.
 
Old 01-16-2012, 03:40 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi mistral99,

Welcome to LQ!!!

Nope, it is not possible to reach the public IP address from server B directly because server B is part of different network then server A's public interface. So it has to go via default gw that is firewall in your case.
 
1 members found this post helpful.
Old 01-16-2012, 04:21 PM   #3
MartinStrec
Member
 
Registered: Jan 2012
Location: Czech
Distribution: Fedora, RHEL, Ubuntu, Mint
Posts: 110

Rep: Reputation: 14
When you use routing packets ever go through all hops as you described.

For to "hide" your inner network you another technique of transporting.

You can use IP tunneling see http://www.linuxfoundation.org/colla...king/tunneling
or Virtual Private Lan Service (such as mikrotik routers) http://wiki.mikrotik.com/wiki/Manual:Interface/VPLS
you can download the VPLS for Linux.
 
1 members found this post helpful.
Old 01-17-2012, 08:39 AM   #4
mistral99
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by T3RM1NVT0R View Post
Hi mistral99,

Welcome to LQ!!!

Nope, it is not possible to reach the public IP address from server B directly because server B is part of different network then server A's public interface. So it has to go via default gw that is firewall in your case.
Thanks, that makes sense - since it's the same box I thought there might be a way. I will look into IP tunneling as MartinStrec suggested, but in the meantime, I changed the applications to reach Server A thru its lan interface. (ServerA is used as a RTP/SIP proxy and handling NAT is not always straightforward.)
 
Old 01-31-2012, 08:27 AM   #5
TimothyEBaldwin
Member
 
Registered: Mar 2009
Posts: 249

Rep: Reputation: 27
You want to do:
Code:
ip route add 1.2.3.4/32 via 192.168.100.76 dev eth0
 
  


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
multihomed server watcher69b Linux - Networking 3 03-19-2010 05:00 AM
Routing Problem on Multihomed Machine rlh989 Linux - Networking 1 06-21-2006 10:33 PM
how to find the telnet server IP address on a multihomed Linux.. lynuz Linux - General 4 10-27-2005 12:13 AM
Multihomed host routing problem.. srns Linux - Networking 3 10-15-2004 03:26 PM
Routing LAN -> WAN -> LAN with unhelpful router synx13 Linux - Networking 2 06-14-2004 02:35 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:37 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration