LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-10-2006, 10:51 PM   #1
bongbangalan
LQ Newbie
 
Registered: Apr 2006
Posts: 2

Rep: Reputation: 0
help in trying to configure red hat router




I have installed red hat 9.0 on a machine i would like to configure as a router and this machine has 2 nic's in it. please help me out as i do not know what steps i have to take to configure this machine. thanks.
 
Old 04-10-2006, 11:49 PM   #2
Jerre Cope
Member
 
Registered: Oct 2003
Location: Texas (central)
Distribution: ubuntu,Slackware,knoppix
Posts: 323

Rep: Reputation: 37
I would recommend reading the documents on this site for learning on how to build all manner of routers:

http://www.shorewall.net/

This is a firewall configuration tool, but the documentation and diagrams are great!
 
Old 04-11-2006, 05:30 AM   #3
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
Quote:
Originally Posted by bongbangalan


I have installed red hat 9.0 on a machine i would like to configure as a router and this machine has 2 nic's in it. please help me out as i do not know what steps i have to take to configure this machine. thanks.
If you would like an easy way to configure a linux router if you not doing it as a learning experience, would be to download and install either IPCOP or Smoothwall. These are both linux router distros that will do everything for you, and both come with a web interface to setup and monitor the firewall.
 
Old 04-11-2006, 03:17 PM   #4
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Linux-Networking and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 04-12-2006, 12:48 AM   #5
bongbangalan
LQ Newbie
 
Registered: Apr 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Thumbs up

thank you for helping me out.
 
Old 04-12-2006, 01:28 AM   #6
deepak rawat
Member
 
Registered: Apr 2006
Posts: 37

Rep: Reputation: 15
i have one pc which have two lan card in it eth0 and eth1
eth0 hav address like
ip address>>>>>>>>> 202.0.0.100
netmask >>>>>>>>> 255.255.255.0
primary DNS >>>>>>> 202.54.15.30
secondary dns >>>>> 203.192.12.42

and the eth1 which is conncted to router hav address
ip address >>>>> 192.168.1.2
netmask >>>>>> 255.255.255.0
gateway >>>>>> 192.168.1.1
PRimary DNS and secondary dns is same to tht of eth0


now what i want is to set the squid proxy server for my private lan which is on ip range 202.0.0.1 to 202.0.0.200

i hav given the entry like this is squid.conf

acl mynetwork src 202.0.0.0/24
http_access allow mynetwork


on the server pc internet is working but on the client i hav change the connection settings to proxy server>>>> 202.0.0.100 and port number to 3128
and still its not working and the reason for that is eth1 ip is 192.168.1.2 but my lan address is 202.0.0.1 to 202.0.0.200 according to my knowledge to solve this problem we need NAT(network address translation) but i am not confortable with iptables
so if anyone here solve this problem

one thing make sure that i want this by squid proxy .

thanks
 
Old 04-12-2006, 05:15 AM   #7
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
Quote:
Originally Posted by deepak rawat
i have one pc which have two lan card in it eth0 and eth1
eth0 hav address like
ip address>>>>>>>>> 202.0.0.100
netmask >>>>>>>>> 255.255.255.0
primary DNS >>>>>>> 202.54.15.30
secondary dns >>>>> 203.192.12.42

and the eth1 which is conncted to router hav address
ip address >>>>> 192.168.1.2
netmask >>>>>> 255.255.255.0
gateway >>>>>> 192.168.1.1
PRimary DNS and secondary dns is same to tht of eth0


now what i want is to set the squid proxy server for my private lan which is on ip range 202.0.0.1 to 202.0.0.200

i hav given the entry like this is squid.conf

acl mynetwork src 202.0.0.0/24
http_access allow mynetwork


on the server pc internet is working but on the client i hav change the connection settings to proxy server>>>> 202.0.0.100 and port number to 3128
and still its not working and the reason for that is eth1 ip is 192.168.1.2 but my lan address is 202.0.0.1 to 202.0.0.200 according to my knowledge to solve this problem we need NAT(network address translation) but i am not confortable with iptables
so if anyone here solve this problem

one thing make sure that i want this by squid proxy .

thanks

OK I'm a little confused about how you have setup this router, you have eth0 as 202.x.x.x, is this allocated by your ISP or do you have this router inside your network and your a making another subnet from your Local network?

If this is a subnet inside your local network you cannot use 202.x.x.x ipaddress, this is a public allocated class C network address, you must use private ipaddresses only. If you don't this can have
DNS issues which will be nothing but headaches.

What happens with networking by default is if there is an ipaddress destination that is not of the same network ID it will be forwared to the default gateway and then let the next network process the packet.

It would be best to change it to something like 192.168.2.1, and if you wont the packet to be able to return to the network without using NAT, you will need to add a route to the routing table of the router that is at the front of your network.

This will usually be the modem that your ISP provides, you will need to tell it to send all packets destined for the 192.168.2.x network goes through the 192.168.1.2 gateway.

Sorry if this is not much help.
 
Old 04-12-2006, 05:18 AM   #8
gmcmaster
Member
 
Registered: Feb 2003
Location: Poole, Dorset, England
Distribution: Fedora Core 5
Posts: 80

Rep: Reputation: 15
He isn't running a Router but a Web Proxy, you can safely ignore the above (no offence to the poster - but it's not what he wants)
 
Old 04-12-2006, 05:41 AM   #9
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
Quote:
Originally Posted by gmcmaster
He isn't running a Router but a Web Proxy, you can safely ignore the above (no offence to the poster - but it's not what he wants)
No offence taken, but if you have to network cards and 2 networks then you have a router, if you don't sort the routing issues out first, no matter what applications you run on top of it like a web proxy, they wont work correctly.
 
Old 04-13-2006, 04:09 AM   #10
deepak rawat
Member
 
Registered: Apr 2006
Posts: 37

Rep: Reputation: 15
ok thnks to u all
but now my squid is working

and btw the router is provided by ISP
and no masquerading needed

thnks
 
  


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
how to configure NS 2 on red hat 9 mystic_durle12 Linux - Networking 2 02-22-2006 12:27 AM
how to configure 6 NICs on Red hat 9.0 to make a firewall/router for 5 lans? johnny_boy_2k3 Linux - Hardware 1 05-02-2004 08:28 PM
How to configure VPN under REd hat 7.3 macaro Linux - Networking 1 09-13-2002 03:55 PM
Using Red Hat Linux as a router tarak4u Linux - Networking 6 06-02-2002 02:00 PM
Using Red Hat Lunix 7.1 as a router sunking299 Linux - Networking 2 05-11-2001 12:38 PM

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

All times are GMT -5. The time now is 06:34 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