hosted by liquidweb


Go Back   Web Hosting Talk : Web Hosting Main Forums : Dedicated Server : Need help regarding network routing
Reply

Dedicated Server Current and past experiences with dedicated server providers, bandwidth, and server performance. Review managed and unmanaged dedicated web servers, discuss both Windows and Unix dedicated server solutions, and discuss dedicated hosting providers. If your service is unavailable, please click here.
Forum Jump

Need help regarding network routing

Reply Post New Thread In Dedicated Server Subscription
 
Send news tip View All Posts Thread Tools Search this Thread Display Modes
  #1  
Old 05-15-2011, 08:53 AM
kohkindachi kohkindachi is offline
Junior Guru
 
Join Date: Apr 2006
Posts: 175
*

Need help regarding network routing


Hey Guys I've been using the method below so that this IP (195.122.131.0) will always be connect to eth0:0's IP

route add -net 195.122.131.0 gw 94.xx.xx.254 netmask 255.255.255.0 dev eth0:0

But it only works for port80 of 195.122.131.0 (i think). How do i do it for other port like 443?

Thanks alot (I'm willing to pay $10 to those who help me)


Last edited by kohkindachi; 05-15-2011 at 09:04 AM.
Reply With Quote


Sponsored Links
  #2  
Old 05-15-2011, 04:59 PM
atlasnetworkseric atlasnetworkseric is offline
Web Hosting Evangelist
 
Join Date: Aug 2008
Location: Seattle, WA
Posts: 463
You can't do this (at all) with routing. You could create an IPTables forwarding rule, though...

You should be able to cobble together what you need from this page:

http://www.cyberciti.biz/faq/linux-p...with-iptables/

__________________
Cloud Computing | Dedicated Servers w/ KVMoIP | Hosted Exchange
Westin Carrier Hotel | Seattle, WA || Starbucks Center | Seattle, WA
IPv6 Enabled
Uptime | Atlas Networks


Reply With Quote
  #3  
Old 05-16-2011, 07:42 AM
kohkindachi kohkindachi is offline
Junior Guru
 
Join Date: Apr 2006
Posts: 175
I've no idea how to dit I'll be paying someone who can help me

Reply With Quote
Sponsored Links
  #4  
Old 05-16-2011, 07:45 AM
rds100 rds100 is online now
Premium Member
 
Join Date: Jan 2011
Location: Varna, Bulgaria
Posts: 1,163
Doing this with "dev eth0:0" is not the right way to do it.
Try this:
Quote:
ip route add 195.122.131.0/24 via 94.xx.xx.254 src y.y.y.y
where y.y.y.y is your IP that you want to use to reach that subnet.

Reply With Quote
  #5  
Old 05-16-2011, 07:50 AM
kohkindachi kohkindachi is offline
Junior Guru
 
Join Date: Apr 2006
Posts: 175
Hi, I tried but
Quote:
[root@ns208842 ~]# ip route add 195.122.131.0/24 via 94.xx.xx.254 src 178.xx.xx.255
RTNETLINK answers: File exists

Reply With Quote
  #6  
Old 05-16-2011, 07:53 AM
rds100 rds100 is online now
Premium Member
 
Join Date: Jan 2011
Location: Varna, Bulgaria
Posts: 1,163
Ok, then, try this:
Quote:
ip route del 195.122.131.0/24
ip route add 195.122.131.0/24 via 94.xx.xx.254 src 178.xx.xx.255
ip route flush cache
and see if it helps

Reply With Quote
  #7  
Old 05-16-2011, 07:53 AM
rds100 rds100 is online now
Premium Member
 
Join Date: Jan 2011
Location: Varna, Bulgaria
Posts: 1,163
By the way if your IP really ends with .255 this may cause all kind of problems to you.

Reply With Quote
  #8  
Old 05-16-2011, 08:06 AM
kohkindachi kohkindachi is offline
Junior Guru
 
Join Date: Apr 2006
Posts: 175
Quote:
Originally Posted by rds100 View Post
Ok, then, try this:

and see if it helps
Hi thanks. that /24 works for port 443?

Reply With Quote
  #9  
Old 05-16-2011, 08:09 AM
rds100 rds100 is online now
Premium Member
 
Join Date: Jan 2011
Location: Varna, Bulgaria
Posts: 1,163
It doesn't care about ports. All connections to 195.122.131.0/24 should be initiated with the specified source address, no matter the ports.

Reply With Quote
  #10  
Old 05-16-2011, 08:27 AM
kohkindachi kohkindachi is offline
Junior Guru
 
Join Date: Apr 2006
Posts: 175
Thanks alot I'll try. But how can i check all/delete entry?

Reply With Quote
  #11  
Old 05-16-2011, 08:29 AM
rds100 rds100 is online now
Premium Member
 
Join Date: Jan 2011
Location: Varna, Bulgaria
Posts: 1,163
ip route
to list the routing table
ip route add ... to add entry
ip route del ... to delete

But be careful - don't delete your defaultroute

Reply With Quote
  #12  
Old 05-16-2011, 08:39 AM
kohkindachi kohkindachi is offline
Junior Guru
 
Join Date: Apr 2006
Posts: 175
Ok I saw it. BTW will this work
ip route add 195.122.0.0/24 via 94.xx.xx.254 src 178.xx.xx.255 ?
I want it to be effective for 195.122.XX.XX, or 195.XX.XX.XX. How can i do it?
Sorry I'm really lousy at all these

Reply With Quote
  #13  
Old 05-16-2011, 08:41 AM
rds100 rds100 is online now
Premium Member
 
Join Date: Jan 2011
Location: Varna, Bulgaria
Posts: 1,163
195.122.x.x is 195.122.0.0/16 (=netmask 255.255.0.0)
195.x.x.x is 195.0.0.0/8 (=netmask 255.0.0.0)

But that IP ending with .255 is goind to cause you problems.

Reply With Quote
  #14  
Old 05-16-2011, 08:50 AM
kohkindachi kohkindachi is offline
Junior Guru
 
Join Date: Apr 2006
Posts: 175
Hi bro check your PM

Reply With Quote
  #15  
Old 05-16-2011, 01:59 PM
atlasnetworkseric atlasnetworkseric is offline
Web Hosting Evangelist
 
Join Date: Aug 2008
Location: Seattle, WA
Posts: 463
Restating the problem:

You want a specific host (195.122.131.0) to always connect to your server's eth0:0 IP.

You -cannot- control the IP that the host connects to with the route command on the server. The host is going to connect to whatever IP it wants on your server. The only thing you can do is redirect, using IPTables, all the traffic from that host to the subinterface you want it to go to.

__________________
Cloud Computing | Dedicated Servers w/ KVMoIP | Hosted Exchange
Westin Carrier Hotel | Seattle, WA || Starbucks Center | Seattle, WA
IPv6 Enabled
Uptime | Atlas Networks


Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Network Routing Issues | A Fix AsadMoeen VPS Hosting 9 10-08-2010 05:54 AM
Need some network advice (multihoming, routing,etc) truenegative Colocation and Data Centers 49 08-31-2009 04:56 PM
AT&T Routing Issue to PCCW Network stevewest15 Providers and Network Outages and Updates 1 12-03-2008 01:33 PM
Colo Network Planning - Routing servand Colocation and Data Centers 15 09-22-2006 01:51 PM
Network routing problem gegeor Providers and Network Outages and Updates 0 05-28-2005 07:27 AM

Related posts from TheWhir.com
Title Type Date Posted
ProfitBricks Launches High Availability Virtual Data Center Services Web Hosting News 2013-05-02 14:39:51
Web Host Hivelocity Updates Network with Noction Intelligent Routing Platform Web Hosting News 2012-10-29 11:45:09
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
Application Publisher Conduit Deploys Cotendo CDN Services Web Hosting News 2011-05-30 17:54:41


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?