Newbie - RedHat as router for windows98

This is a discussion on Newbie - RedHat as router for windows98 within the Linux Networking forums, part of the Linux Forums category; Hi I installed the RedHat9 from the 3 CDs downloaded from RedHat. Install went well. I am having a bit ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 12-11-2003
NimmerSoft
 
Posts: n/a
Default Newbie - RedHat as router for windows98

Hi
I installed the RedHat9 from the 3 CDs downloaded from RedHat.
Install went well.
I am having a bit of a thing here.
I have got to the point where I can get on the net with the RedHat9
linux machine.
The Samba makes the machine visible to the windows98-machines and vice
versa. So apparantly the network as such is working. One NIC is set to
a fixed IP and the other (exteral) to DHCP.
I would like to use the linux machine as a "router/gateway" and as a
webserver (with apache showing my homepages) instead of the windows98
machine I am using for that now.
I have an ADSL modem and a switch. The Linux has two NICs and one goes
to the ADSL-line and the other to the switch to which two windows98
machines are connected.
How do I get the other machines to connect to the net through the
Linux one?
Has it got something to do with the Apache server? Or proxy?
I am a NEWBIE.
Linux looks like fun. Who can help?? Thanks
Om Mani Peme Hung
Reply With Quote
  #2 (permalink)  
Old 12-11-2003
Peter Matulis
 
Posts: n/a
Default Re: Newbie - RedHat as router for windows98

On 11 Dec 2003 08:26:32 -0800, nimmer@tdcspace.dk (NimmerSoft) wrote:

>Hi
>I installed the RedHat9 from the 3 CDs downloaded from RedHat.
>Install went well.
>I am having a bit of a thing here.
>I have got to the point where I can get on the net with the RedHat9
>linux machine.
>The Samba makes the machine visible to the windows98-machines and vice
>versa. So apparantly the network as such is working. One NIC is set to
>a fixed IP and the other (exteral) to DHCP.
>I would like to use the linux machine as a "router/gateway" and as a
>webserver (with apache showing my homepages) instead of the windows98
>machine I am using for that now.
>I have an ADSL modem and a switch. The Linux has two NICs and one goes
>to the ADSL-line and the other to the switch to which two windows98
>machines are connected.
>How do I get the other machines to connect to the net through the
>Linux one?
>Has it got something to do with the Apache server? Or proxy?
>I am a NEWBIE.
>Linux looks like fun. Who can help?? Thanks
>Om Mani Peme Hung


You have to do three things:

1. make the Linux system act as a router
2. give the windows machine the Linux system's internal address as its
default gateway.
3. set up the DNS server address(es) on the windows machine (if your
Linux box is indeed resolving names on the internet then these
addresses will be found in /etc/resolv.conf - just copy them over into
your windows settings)

Notes:

a) it is generally a bad idea to have Samba running on a machine that
is directly connected to the internet. If so, at least make sure that
Samba is not listening on its external interface (see the 'interfaces'
parameter in the smb.conf man page).

b) make sure you set up a firewall on the Linux box.

Prajna Paramita
Reply With Quote
  #3 (permalink)  
Old 12-12-2003
NimmerSoft
 
Posts: n/a
Default Re: Newbie - RedHat as router for windows98

Peter Matulis <1@1.com> wrote in message news:<9f7htvgm9g0bull9fi1gq604irjnuaj2hv@4ax.com>. ..
> On 11 Dec 2003 08:26:32 -0800, nimmer@tdcspace.dk (NimmerSoft) wrote:
>
> >Hi
> >I installed the RedHat9 from the 3 CDs downloaded from RedHat.
> >Install went well.
> >I am having a bit of a thing here.
> >I have got to the point where I can get on the net with the RedHat9
> >linux machine.
> >The Samba makes the machine visible to the windows98-machines and vice
> >versa. So apparantly the network as such is working. One NIC is set to
> >a fixed IP and the other (exteral) to DHCP.
> >I would like to use the linux machine as a "router/gateway" and as a
> >webserver (with apache showing my homepages) instead of the windows98
> >machine I am using for that now.
> >I have an ADSL modem and a switch. The Linux has two NICs and one goes
> >to the ADSL-line and the other to the switch to which two windows98
> >machines are connected.
> >How do I get the other machines to connect to the net through the
> >Linux one?
> >Has it got something to do with the Apache server? Or proxy?
> >I am a NEWBIE.
> >Linux looks like fun. Who can help?? Thanks
> >Om Mani Peme Hung

>
> You have to do three things:
>
> 1. make the Linux system act as a router
> 2. give the windows machine the Linux system's internal address as its
> default gateway.
> 3. set up the DNS server address(es) on the windows machine (if your
> Linux box is indeed resolving names on the internet then these
> addresses will be found in /etc/resolv.conf - just copy them over into
> your windows settings)
>
> Notes:
>
> a) it is generally a bad idea to have Samba running on a machine that
> is directly connected to the internet. If so, at least make sure that
> Samba is not listening on its external interface (see the 'interfaces'
> parameter in the smb.conf man page).
>
> b) make sure you set up a firewall on the Linux box.
>
> Prajna Paramita



Thank you very much Prajna Paramita. It was exactly that kind of info
I was looking for.
Now there is a follow up question:
HOW do I set the Linux machine to act as a router. I have been trying
different things but only messed things up.
OmManiPemeHung
Reply With Quote
  #4 (permalink)  
Old 12-15-2003
Peter Matulis
 
Posts: n/a
Default Re: Newbie - RedHat as router for windows98

On 12 Dec 2003 01:54:08 -0800, nimmer@tdcspace.dk (NimmerSoft) wrote:

>Peter Matulis <1@1.com> wrote in message news:<9f7htvgm9g0bull9fi1gq604irjnuaj2hv@4ax.com>. ..
>> On 11 Dec 2003 08:26:32 -0800, nimmer@tdcspace.dk (NimmerSoft) wrote:


>HOW do I set the Linux machine to act as a router. I have been trying
>different things but only messed things up.


My friend, to master Linux you must learn to search the internet.
Anyhow, one way to immediately enable routing (also called IP
forwarding) in the Linux kernel:

# echo 1 > /proc/sys/net/ipv4/ip_forward

You need to do something else to make this permanent. In redhat, I
think it is /etc/sysctl.conf where you set

net.ipv4.ip_forward = 1

Or even in /etc/sysconfig/network you make

FORWARD_IPV4=true

Your next step is to set up routing tables (search). Finally, you
really should set up a firewall for protection. In Linux the firewall
system is called NetFilter. Go to its home page

http://www.netfilter.org/

and look into the documentation.
Reply With Quote
  #5 (permalink)  
Old 12-16-2003
stewart menday
 
Posts: n/a
Default Re: Newbie - RedHat as router for windows98

Peter
I did the echo 1 and set ip_forward to true on my redhat 9 machine but
it doesn't seem to work. Do you know if the binaries for rh 9 are compiled
with ip forwarding disabled?

Thanks

Stewart

"Peter Matulis" <1@1.com> wrote in message
news:73bqtvcr4r3hc85le7kndkktgheo5lp3dn@4ax.com...
> On 12 Dec 2003 01:54:08 -0800, nimmer@tdcspace.dk (NimmerSoft) wrote:
>
> >Peter Matulis <1@1.com> wrote in message

news:<9f7htvgm9g0bull9fi1gq604irjnuaj2hv@4ax.com>. ..
> >> On 11 Dec 2003 08:26:32 -0800, nimmer@tdcspace.dk (NimmerSoft) wrote:

>
> >HOW do I set the Linux machine to act as a router. I have been trying
> >different things but only messed things up.

>
> My friend, to master Linux you must learn to search the internet.
> Anyhow, one way to immediately enable routing (also called IP
> forwarding) in the Linux kernel:
>
> # echo 1 > /proc/sys/net/ipv4/ip_forward
>
> You need to do something else to make this permanent. In redhat, I
> think it is /etc/sysctl.conf where you set
>
> net.ipv4.ip_forward = 1
>
> Or even in /etc/sysconfig/network you make
>
> FORWARD_IPV4=true
>
> Your next step is to set up routing tables (search). Finally, you
> really should set up a firewall for protection. In Linux the firewall
> system is called NetFilter. Go to its home page
>
> http://www.netfilter.org/
>
> and look into the documentation.



Reply With Quote
  #6 (permalink)  
Old 12-16-2003
Peter Matulis
 
Posts: n/a
Default Re: Newbie - RedHat as router for windows98

On Tue, 16 Dec 2003 20:47:52 +1100, "stewart menday" <stewart at
webstorm.net.au> wrote:

>Peter
> I did the echo 1 and set ip_forward to true on my redhat 9 machine but
>it doesn't seem to work. Do you know if the binaries for rh 9 are compiled
>with ip forwarding disabled?


Hi again. Try to avoid top posting.

Routing (ip forwarding) is a feature of the kernel - not "the
binaries". Every unix like os has the forwarding feature compiled in
their default kernel.

For me to continue to help, you must now supply your network setup;
the testing procedure you are using; and any error output.

Peter
Danville, QC
Reply With Quote
  #7 (permalink)  
Old 12-18-2003
stewart menday
 
Posts: n/a
Default Re: Newbie - RedHat as router for windows98

Peter
Try Routing is a feature of the kernel, once the kernel is compiled it
becomes a binary (I didn't get the source). For the kernel to support
routing it must be compiled with routing enabled. It was by default
compiled this way under Redhat 6 and 7 but I am thinking that it is not
under Redhat 9. I read somewhere that routing was to be disabled by
default, true the config files had it disabled but I have enabled it there,
so the only thing that I can think of is that the kernel was compiled with
it disabled. When I try to start the rip it doesn't start no errors just
doesn't start.

Thanks

Stewart

"Peter Matulis" <1@1.com> wrote in message
news:onhutvoi97d30cfordh39igm4qbrerb2m5@4ax.com...
> On Tue, 16 Dec 2003 20:47:52 +1100, "stewart menday" <stewart at
> webstorm.net.au> wrote:
>
> >Peter
> > I did the echo 1 and set ip_forward to true on my redhat 9 machine

but
> >it doesn't seem to work. Do you know if the binaries for rh 9 are

compiled
> >with ip forwarding disabled?

>
> Hi again. Try to avoid top posting.
>
> Routing (ip forwarding) is a feature of the kernel - not "the
> binaries". Every unix like os has the forwarding feature compiled in
> their default kernel.
>
> For me to continue to help, you must now supply your network setup;
> the testing procedure you are using; and any error output.
>
> Peter
> Danville, QC



Reply With Quote
  #8 (permalink)  
Old 12-18-2003
Peter Matulis
 
Posts: n/a
Default Re: Newbie - RedHat as router for windows98

On Thu, 18 Dec 2003 10:12:18 +1100, "stewart menday" <stewart at
webstorm.net.au> wrote:

>Peter
> Try Routing is a feature of the kernel, once the kernel is compiled it
>becomes a binary (I didn't get the source). For the kernel to support
>routing it must be compiled with routing enabled. It was by default
>compiled this way under Redhat 6 and 7 but I am thinking that it is not
>under Redhat 9. I read somewhere that routing was to be disabled by
>default, true the config files had it disabled but I have enabled it there,
>so the only thing that I can think of is that the kernel was compiled with
>it disabled. When I try to start the rip it doesn't start no errors just
>doesn't start.


You mentioned "binaries" as in a plurality. I figured you were saying
that routing is somehow mixed up in the regular binaries. At any
rate, I don't consider the kernel a binary. To me a binary is
executable code that is *run by the kernel* but this isn't my area so
I better not say any more.

Anyhow, although I do not use RedHat any longer I severely doubt that
this distro (considering its mission) has removed the routing feature
in its default kernel. Why would they do that? Even the security
minded OpenBSD doesn't do that. You probably read that it was
disabled in the network configuration. A quick message in a RH
newsgroup will set the story straight.

What do you mean by "start the rip"? Do you mean to use the RIP
routing protocol? What do you expect to achieve by doing that? And
how are you "starting the rip"?

Best to string your machines together and use the ping program to test
if your router is working.
Reply With Quote
  #9 (permalink)  
Old 12-18-2003
stewart menday
 
Posts: n/a
Default Re: Newbie - RedHat as router for windows98

Peter
"The rip", must of been on drugs (lol) when I wrote that, I did mean the
RIP routing protocol but I agree with you I don't know what I was trying to
achieve. My setup is as follows;

ADSL modem with fixed IP to the internet, ip of 192.168.1.1 on the other
side (my network)
A Redhat 9 Linux box with ip of 192.168.1.2, no firewall
A dialin line which gets assigned ip of 192.168.1.3 when I dial in.

From the Linux box everything works fine, I can access the internet etc

When I dialin I connect to the Linux box without any problems (running
mgetty). After dialin I can ping the Linux box but cannot ping the adsl
modem (192.168.1.1). If I run dcpdump -i ppp0 on the Linux box I can see
the echo request from 192.168.1.3 > 192.168.1.1 but there is no reply, at
least not back through the Linux box. Do I need to run NAT on the Linux box
to get the reply to go through 192.158.1.2 (Linux box)?

web - ADSL Modem - Linux - windows via dialin
fixed ip - 192.168.1.1 - .1.2 - .1.3

Thanks your help

Stewart


"Peter Matulis" <1@1.com> wrote in message
news:siq1uvk685cc80ha3atqe98cgolbahoqf2@4ax.com...
> On Thu, 18 Dec 2003 10:12:18 +1100, "stewart menday" <stewart at
> webstorm.net.au> wrote:
>
> >Peter
> > Try Routing is a feature of the kernel, once the kernel is compiled

it
> >becomes a binary (I didn't get the source). For the kernel to support
> >routing it must be compiled with routing enabled. It was by default
> >compiled this way under Redhat 6 and 7 but I am thinking that it is not
> >under Redhat 9. I read somewhere that routing was to be disabled by
> >default, true the config files had it disabled but I have enabled it

there,
> >so the only thing that I can think of is that the kernel was compiled

with
> >it disabled. When I try to start the rip it doesn't start no errors just
> >doesn't start.

>
> You mentioned "binaries" as in a plurality. I figured you were saying
> that routing is somehow mixed up in the regular binaries. At any
> rate, I don't consider the kernel a binary. To me a binary is
> executable code that is *run by the kernel* but this isn't my area so
> I better not say any more.
>
> Anyhow, although I do not use RedHat any longer I severely doubt that
> this distro (considering its mission) has removed the routing feature
> in its default kernel. Why would they do that? Even the security
> minded OpenBSD doesn't do that. You probably read that it was
> disabled in the network configuration. A quick message in a RH
> newsgroup will set the story straight.
>
> What do you mean by "start the rip"? Do you mean to use the RIP
> routing protocol? What do you expect to achieve by doing that? And
> how are you "starting the rip"?
>
> Best to string your machines together and use the ping program to test
> if your router is working.



Reply With Quote
  #10 (permalink)  
Old 12-18-2003
Peter Matulis
 
Posts: n/a
Default Re: Newbie - RedHat as router for windows98

On Thu, 18 Dec 2003 13:25:01 +1100, "stewart menday" <stewart at
webstorm.net.au> wrote:

>ADSL modem with fixed IP to the internet, ip of 192.168.1.1 on the other
>side (my network)
>A Redhat 9 Linux box with ip of 192.168.1.2, no firewall
>A dialin line which gets assigned ip of 192.168.1.3 when I dial in.
>
>From the Linux box everything works fine, I can access the internet etc
>
>When I dialin I connect to the Linux box without any problems (running
>mgetty). After dialin I can ping the Linux box but cannot ping the adsl
>modem (192.168.1.1). If I run dcpdump -i ppp0 on the Linux box I can see
>the echo request from 192.168.1.3 > 192.168.1.1 but there is no reply, at
>least not back through the Linux box. Do I need to run NAT on the Linux box
>to get the reply to go through 192.158.1.2 (Linux box)?
>
>web - ADSL Modem - Linux - windows via dialin
>fixed ip - 192.168.1.1 - .1.2 - .1.3


Finally I understand what you are trying to do. An interesting
project.

Because I am unfamiliar with such a setup I will guess that you may
need to assign the windows client an address (say 2.2) on a different
network. Routing is for, well, routing packets from one network to
another. Here everything is on the same network. This assumes you
can bind an address to ppp0 (say 2.1).

Questions:

a) can you ping the modem from the Linux box? Probably since you can
access the net but entertain me.

b) how is the Linux box connected to the modem? A standard cross-over
cat 5 cable?

c) what is the make and model of your modem? It must be pretty new to
be able to take on two ethernet addresses.

d) What output do you get when you issue the following command when
the windows client is connected:

# ifconfig ppp0
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 09:11 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0