LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 08-29-2005, 10:08 AM   #1
deepclutch
Member
 
Registered: Nov 2004
Location: Kerala, India
Distribution: Debian Bookworm
Posts: 773
Blog Entries: 1

Rep: Reputation: 34
RHEL 4 as a Router?


Hai
How can we configure Linux system(RedHat) as a router ?
Somebody Knows?
 
Old 08-29-2005, 10:56 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
just as a router? well there's loads of things that a "router" can do, but gernally that's a waste of a full server distro. instead you might prefer ipcop or smoothwall. the answer to whatever you want is most likely in the lartc (linux advanced routing and traffic control) howto at tldp.org. if you require more specific help, you need to tell us what functionality you desire.
 
Old 08-30-2005, 10:57 AM   #3
deepclutch
Member
 
Registered: Nov 2004
Location: Kerala, India
Distribution: Debian Bookworm
Posts: 773

Original Poster
Blog Entries: 1

Rep: Reputation: 34
But...can i experiment as
below:
1st machine:192.168.0.141
2nd machine:10.0.0.10.
How can I route one machine to other?I doubt some files like
/etc/sysconfig/ifcfg-eth0 copied to /etc/sysconfig/ifcfg-eth0:0
edit /etc/sysctl.conf
net.ipv4.ip_forward=1
and edit gatway addrsss as reversed IPs of 1st and 2nd machines?Help Plsssss
ie,
#vi /etc/sysconfig/ifcfg-eth0
ipaddr=10.0.0.10
S/N mask=255.0.0.0
gateway=192.168.0.141
AND,
#vi /etc/sysconfig/ifcfg-eth0:0
ipaddr=192.168.0.141
S/N mask=255.255.255.0
gateway=10.0.0.10
what2do?what2do?what2do?what2do?

Last edited by deepclutch; 08-30-2005 at 11:17 AM.
 
Old 08-30-2005, 11:09 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
so you want one machine connecting these two? that'd be a case of having ip forwarding enabled on that machine and just having a functional NIC for each connected LAN involved. pretty simple.
 
Old 08-30-2005, 11:40 AM   #5
deepclutch
Member
 
Registered: Nov 2004
Location: Kerala, India
Distribution: Debian Bookworm
Posts: 773

Original Poster
Blog Entries: 1

Rep: Reputation: 34
Post

PLEASE CAN YOU EXPLAIN IN BRIEF
 
Old 08-30-2005, 02:41 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
don't shout, and say please... and I'd just suggest you look at the ip forwarding howto at tldp.org or an one of a thousand other suitable documents that are already out there. You may want to just use a generic firewall builder like firestarter to configure it for you.
 
Old 08-31-2005, 03:35 AM   #7
deepclutch
Member
 
Registered: Nov 2004
Location: Kerala, India
Distribution: Debian Bookworm
Posts: 773

Original Poster
Blog Entries: 1

Rep: Reputation: 34
Smile

Hey,I'm not shouting anyway
Solved..
In My RHEL 4 WS , But...I experimented as
below:
1st machine:192.168.0.141
2nd machine:10.0.0.140
In 1st machine,
/etc/sysconfig/ifcfg-eth0 copied to /etc/sysconfig/ifcfg-eth0:0,
A virtual IP with value=10.0.0.10
edit /etc/sysctl.conf
net.ipv4.ip_forward=1(IP forwarding enabled)
and edit gatway addrsss as reversed IPs on 1st machine.
ie,
#vi /etc/sysconfig/ifcfg-eth0
DEVICE=eth0
ipaddr=192.168.0.141
S/N mask=255.255.255.0
gateway=10.0.0.10
AND,
#vi /etc/sysconfig/ifcfg-eth0:0
DEVICE=eth0:0
ipaddr=10.0.0.10
S/N mask=255.0.0.0
gateway=192.168.0.141
then #service network restart
While in 2nd machine,
#vi /etc/sysconfig/ifcfg-eth0
DEVICE=eth0
ipaddr=10.0.0.140
S/N mask=255.0.0.0
gateway=10.0.0.10
save
service network restart
and
#ping 192.168.0.141
It Will work!

Last edited by deepclutch; 08-31-2005 at 03:40 AM.
 
  


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
Upgrade RHEL 3 AS to RHEL 4 AS louisb Linux - Enterprise 8 06-04-2009 02:57 PM
Small Linux Router/firewall behind D-Link Hardware router dleidlein Linux - Networking 6 04-30-2007 05:12 AM
Linux Router & Netgear Wireless Router DMaCATO Linux - Wireless Networking 1 04-30-2004 09:16 AM
/etc/resolv.conf configuration when behind a router(not a linux router) rmanocha Linux - Networking 2 04-28-2004 01:52 AM
Mandrake Firewall/router networked to US Robotics 8000A router jrzplace Linux - Networking 0 11-17-2003 04:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 03:07 PM.

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