Basic routing help

Basic routing help

Post by Patrick Heal » Sat, 01 Dec 2001 15:08:39



Hello,

<embarrased>

I have a Red Hat 7.1 distribution installed on a dual-NIC system.  On one
side (the first NIC) is a DSL connection.  On the other is the internal
network.

Can anyone direct me to a source that offers a cookbook approach to setting
up routing between the internal network and the DSL/Internet connection?
I've been beating my head against the wall on something that I thought I
knew how to do...

</embarrased>

Thanks,

Pat Healy

 
 
 

Basic routing help

Post by Jakob Strebe » Sat, 01 Dec 2001 21:20:02


Patrick,
when you say dual NIC, do you mean 2 Etnernet cards?

Can you give some more details about your config?
what netstat -rn tells us?

jakob


>Hello,

><embarrased>

>I have a Red Hat 7.1 distribution installed on a dual-NIC system.  On one
>side (the first NIC) is a DSL connection.  On the other is the internal
>network.

>Can anyone direct me to a source that offers a cookbook approach to setting
>up routing between the internal network and the DSL/Internet connection?
>I've been beating my head against the wall on something that I thought I
>knew how to do...

></embarrased>

>Thanks,

>Pat Healy


 
 
 

Basic routing help

Post by Patrick Heal » Sat, 01 Dec 2001 22:04:28


Yes, I mean 2 NICs (rather than a "multi-port" ethernet card...)

The NIC connected to the internal network is 192.168.0.X w/ a net mask of
255.255.255.0
The NIC connected to the outside world has a fixed IP address assigned by
the ISP.  (For obvious
reasons I won't post that IP addres...).

I'm more interested in getting the Linux host to do very basic routing with
out NAT, and I'd like to take
advantage of the iproute2 package that comes with the 2.4 kernel.

Thanks Jakob!

Pat Healy


> Patrick,
> when you say dual NIC, do you mean 2 Etnernet cards?

> Can you give some more details about your config?
> what netstat -rn tells us?

> jakob


> >Hello,

> ><embarrased>

> >I have a Red Hat 7.1 distribution installed on a dual-NIC system.  On one
> >side (the first NIC) is a DSL connection.  On the other is the internal
> >network.

> >Can anyone direct me to a source that offers a cookbook approach to
setting
> >up routing between the internal network and the DSL/Internet connection?
> >I've been beating my head against the wall on something that I thought I
> >knew how to do...

> ></embarrased>

> >Thanks,

> >Pat Healy

 
 
 

Basic routing help

Post by Dean Thompso » Sat, 01 Dec 2001 22:21:08


Hi!,

Quote:> <embarrased>

> I have a Red Hat 7.1 distribution installed on a dual-NIC system.  On one
> side (the first NIC) is a DSL connection.  On the other is the internal
> network.

> Can anyone direct me to a source that offers a cookbook approach to setting
> up routing between the internal network and the DSL/Internet connection?
> I've been beating my head against the wall on something that I thought I
> knew how to do...

Check to make sure that you have activated IP forwarding on your system (echo
"1" > /proc/sys/net/ipv4/ip_forward) or change the entry in the
/etc/sysctl.conf file.  You will then need to activate your MASQ'ing
arrangements:

/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
                                        ^^^^ ---> This is the interface that
                                                   is connected to your DSL
                                                   network equipment.

You may also have to make sure that you aren't running a restrictive firewall
on your system which would be blocking the return on the incoming MASQ'ed
packets.  RH 7.1 and 7.2 by default will install a pretty restrictive
firewall.

See ya

Dean Thompson

--
+____________________________+____________________________________________+

| Bach. Computing (Hons)     | ICQ     - 45191180                         |
| PhD Student                | Office  - <Off-Campus>                     |
| School Comp.Sci & Soft.Eng | Phone   - +61 3 9903 2787 (Gen. Office)    |
| MONASH (Caulfield Campus)  | Fax     - +61 3 9903 1077                  |
| Melbourne, Australia       |                                            |
+----------------------------+--------------------------------------------+

 
 
 

Basic routing help

Post by Dean Thompso » Sat, 01 Dec 2001 22:42:10


Hi!,

Quote:> Yes, I mean 2 NICs (rather than a "multi-port" ethernet card...)

> The NIC connected to the internal network is 192.168.0.X w/ a net mask of
> 255.255.255.0
> The NIC connected to the outside world has a fixed IP address assigned by
> the ISP.  (For obvious
> reasons I won't post that IP addres...).

> I'm more interested in getting the Linux host to do very basic routing with
> out NAT, and I'd like to take advantage of the iproute2 package that comes
> with the 2.4 kernel.

If you want your internal network to talk to the outside world, won't you have
to use NAT to allow the packets in and out of your system ?

See ya

Dean Thompson

--
+____________________________+____________________________________________+

| Bach. Computing (Hons)     | ICQ     - 45191180                         |
| PhD Student                | Office  - <Off-Campus>                     |
| School Comp.Sci & Soft.Eng | Phone   - +61 3 9903 2787 (Gen. Office)    |
| MONASH (Caulfield Campus)  | Fax     - +61 3 9903 1077                  |
| Melbourne, Australia       |                                            |
+----------------------------+--------------------------------------------+

 
 
 

Basic routing help

Post by Karl Heye » Sat, 01 Dec 2001 22:55:33



> Yes, I mean 2 NICs (rather than a "multi-port" ethernet card...)

> The NIC connected to the internal network is 192.168.0.X w/ a net mask of
> 255.255.255.0
> The NIC connected to the outside world has a fixed IP address assigned by
> the ISP.  (For obvious
> reasons I won't post that IP addres...).

> I'm more interested in getting the Linux host to do very basic routing with
> out NAT, and I'd like to take
> advantage of the iproute2 package that comes with the 2.4 kernel.

direct routing is not going to be possible without NAT with addresses
like 192.168 are involved.  If you don't want NAT involved then you
have to use a proxy.

karl.

 
 
 

Basic routing help

Post by M. Buchenriede » Sun, 02 Dec 2001 05:28:32



>Yes, I mean 2 NICs (rather than a "multi-port" ethernet card...)
>The NIC connected to the internal network is 192.168.0.X w/ a net mask of
>255.255.255.0
>The NIC connected to the outside world has a fixed IP address assigned by
>the ISP.  (For obvious
>reasons I won't post that IP addres...).

Why? It won't hurt.

Quote:>I'm more interested in getting the Linux host to do very basic
>routing with
>out NAT,

[..]

Impossible with a 192.168.0.x network address. Packets originating
from within that network have to be masqueraded prior to being sent
through a router into the Internet.

Otherwise, if all you'd need was Internet, setup a proxy.

Michael
--

          Lumber Cartel Unit #456 (TINLC) & Official Netscum
    Note: If you want me to send you email, don't munge your address.

 
 
 

1. routing basics

Hope you can help....
I have two SCO 505 OSE servers and a cisco router that is connected to the
internet thru ISP. Server A has IP 192.168.1.2 ,
Server B has two IP-internal 192.168.1.1 and say external 203.54.3.30 (not
real) Router IP 203.54.3.29.
I want to get Sever A to ftp the internet for customer updates.
I know it has to go through server B and onto the router.
Server B has default route to router(4.29) This all works Ok.
What route should be set up on Server A to pass anything not destined for
its network to go through Server B.  AND get back to it. I have Server A
resolving DNS Names from the internet but pinging www.sco.com just sits
there.

# ping www.sco.com
PING www.sco.com (209.1.8.14): 56 data bytes

--- www.sco.com ping statistics ---
8 packets transmitted, 0 packets received, 100% packet loss
#

Routing Information on Server A : (192.168.1.2)
# netstat -nr
Routing tables
Destination      Gateway            Flags    Refs      Use  Interface
default          192.168.1.1        UGS         0       32  net1
127.0.0.1        127.0.0.1          UH          7   156276  lo0
192.168.1        192.168.1.2        UC          1        0  net1
192.168.1.2      127.0.0.1          UGHS        2     2863  lo0
203.53.4         192.168.1.1        UGS         0        0  net1
224              192.168.1.2        UCS         0        0  net1
#
Routing Information onServer B (192.168.1.1 and 203.54.3.130) :
# netstat -nr
Routing tables
Destination      Gateway            Flags    Refs      Use  Interface
default          203.54.3.129       UGS         3    10059  net1
127.0.0.1        127.0.0.1          UH         14     2384  lo0
192.168.1        192.168.1.1        UC          1        0  net0
192.168.1.1      127.0.0.1          UGHS        3    18456  lo0
203.54.3.130     127.0.0.1          UGHS        1       19  lo0
203.54.3.131     192.168.1.2        UGHS        0        8  net0
#

2. Need algorithm to convert a given date&time in seconds to String format

3. basic routing from eth0 to ppp0

4. Compiling ups: Cannot find stab.h

5. adding a route in aix - no basic question!

6. A/UX partitions

7. Basic Mail Routing Trouble

8. message queue struct problem

9. Basic Routing

10. basic routing

11. BASIC? Routing

12. Basic route usage.

13. basic routing/ win2k dns problem