LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 10-24-2004, 09:54 AM   #1
StraitFaced
Member
 
Registered: Oct 2004
Posts: 31

Rep: Reputation: 15
Routing Problem


I'm having trouble with a Redhat 9 Server that a vendor set up for us. When I'm logged into the network when I am at work I can ping it as well as ssh into just fine with no problems. When I dial into the corporate network from home I can't ping it or ssh it at all.

I'm pretty sure it's something to do with the routing because at the network at work it's all static and I'm on the same network but when I'm dialed in corporate I'm assigned some wierd ip that's not on the same network. I checked the /etc/sysconfig stuff and it all looked ok from what I could tell, ip, subnet mask, gateway and all. Do you have any seggestions on what I might look for. Thanks.

Oh, and I should also mention that we are running a RedHat7.2 server pretty much the same way but I have no issues with that. It's running just how it's suppose to.
 
Old 10-24-2004, 10:53 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Welcome to LQ.

You may need to contact your IT department to setup a NAT or firewall rule.

Can you post a copy of the following from the server and your 2 client locations (ie work and home):
ifconfig
route -n

If the clients are windows then you can use:
ipconfig /all
route print
 
Old 10-24-2004, 11:22 AM   #3
StraitFaced
Member
 
Registered: Oct 2004
Posts: 31

Original Poster
Rep: Reputation: 15
Thanks for the advice. I'll look into it.
 
Old 10-25-2004, 02:02 PM   #4
StraitFaced
Member
 
Registered: Oct 2004
Posts: 31

Original Poster
Rep: Reputation: 15
Ok. I think I got it. Our default gateway in the routing table was all messed up. It works now but it's not permanent because I used...

route add default gw (OUR GATWAY IP)

How do I edit the routing table permanately? I should mention it's redHat 9 so there isn't a /etc/sysconfig/static-routes. Could I just make one. Will that work? Or will I have to edit the networking-scripts?

Last edited by StraitFaced; 10-25-2004 at 02:05 PM.
 
Old 10-25-2004, 02:59 PM   #5
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You can set the default gateway in:
/etc/sysconfig/network

By adding (or changing) a line like:
GATEWAY=ip.of.gw.here
 
Old 10-25-2004, 03:26 PM   #6
StraitFaced
Member
 
Registered: Oct 2004
Posts: 31

Original Poster
Rep: Reputation: 15
I did that but it doesn't change my routing table. I just can't get the right gateway in the table to stay.
 
Old 10-25-2004, 03:30 PM   #7
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Pehaps you have a gateway specified with your nic(s):
grep -i gateway /etc/sysconfig/network-scripts/ifcfg*
 
Old 10-25-2004, 04:05 PM   #8
StraitFaced
Member
 
Registered: Oct 2004
Posts: 31

Original Poster
Rep: Reputation: 15
hmmmm..... Very strange. In the ifcfg-eth0 the gateway that is linked to corporate is in there. But it's using the gateway in ifcfg-eth1 to put in the routing table.
 
Old 10-26-2004, 11:22 AM   #9
StraitFaced
Member
 
Registered: Oct 2004
Posts: 31

Original Poster
Rep: Reputation: 15
straitfaced

Well I just added "route add default gw (GATE.WAY.IP.HERE) dev eth0" into the /etc/sysconfig/network-scripts/ifup-routes and it seems to work fine there. When I reboot it is now added to the routing tables and all is well and good.

I know this is a little ghetto rigged so is there any other better way to achieve this?
 
  


Reply



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
routing problem DRagonRage Debian 8 09-21-2005 03:29 PM
routing problem DRagonRage Linux - Networking 1 09-21-2005 01:02 PM
Routing problem Infernal211283 Linux - Networking 3 02-28-2005 02:59 AM
Another Routing problem Bambi Linux - Networking 2 06-03-2004 03:13 PM
routing problem nowonmai Linux - Networking 2 10-09-2003 07:59 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 01:50 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
Open Source Consulting | Domain Registration