Networking Forums

Networking Forums > Computer Networking > Linux Networking > 2 nics gateway

Reply
Thread Tools Display Modes

2 nics gateway

 
 
Andre Nottenkaemper
Guest
Posts: n/a

 
      10-17-2003, 09:56 AM
Hi!
I have a Problem with the following configuration:

Network1 Linux-Box Network2 Gateway-InternetPC
192.168.1.0/24 eth0<--> eth1 10.151.1.0/24 -> 10.151.1.1

I would like to route everything from Network1 into Network2 but everything
i tried didn´t work.
Ip Forwarding is enables... thats the only thing i got to work properly!

All Pc´s in Network1 should be able to access the internet through the
gateway-internet pc

can somebody recommend some good howtos or give me some kind of newbie
setup guide?


thanks a lot!

regards
andre
 
Reply With Quote
 
 
 
 
Eggert Ehmke
Guest
Posts: n/a

 
      10-17-2003, 01:16 PM
Andre Nottenkaemper wrote:

> Network1 Linux-Box Network2 Gateway-InternetPC
> 192.168.1.0/24 eth0<--> eth1 10.151.1.0/24 -> 10.151.1.1
>
> I would like to route everything from Network1 into Network2 but
> everything i tried didn?t work.
> Ip Forwarding is enables... thats the only thing i got to work properly!
>
>
> All Pc?s in Network1 should be able to access the internet through the
> gateway-internet pc
>
> can somebody recommend some good howtos or give me some kind of newbie
> setup guide?


Have you enabled IP-forwarding ?

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

Eggert
 
Reply With Quote
 
Andre Nottenkaemper
Guest
Posts: n/a

 
      10-17-2003, 02:09 PM

> Have you enabled IP-forwarding ?
>
> echo "1" > /proc/sys/net/ipv4/ip_forward
>
> Eggert


yea. thats the only thing i did and which i´m 100% sure i did it right
i believe i need to add some routes (route add blahblah) but i´m not sure
how and what i have to set up.

 
Reply With Quote
 
Eggert Ehmke
Guest
Posts: n/a

 
      10-17-2003, 04:12 PM
Andre Nottenkaemper wrote:

> can somebody recommend some good howtos or give me some kind of newbie
> setup guide?


http://www.netfilter.org/documentation/index.html#HOWTO
http://www.yolinux.com/TUTORIALS/Lin...rkGateway.html

Or you use one of the preconfigured firewall scripts:
http://monmotha.mplug.org/firewall/index.php

you only have to configure your interfaces eth0 and eth1, and the respective
IP ranges, and it works out of the box.
Eggert
 
Reply With Quote
 
David Efflandt
Guest
Posts: n/a

 
      10-17-2003, 11:05 PM
On Fri, 17 Oct 2003, Andre Nottenkaemper <(E-Mail Removed)> wrote:
> I have a Problem with the following configuration:
>
> Network1 Linux-Box Network2 Gateway-InternetPC
> 192.168.1.0/24 eth0<--> eth1 10.151.1.0/24 -> 10.151.1.1
>
> I would like to route everything from Network1 into Network2 but everything
> i tried didn´t work.
> Ip Forwarding is enables... thats the only thing i got to work properly!
>
> All Pc´s in Network1 should be able to access the internet through the
> gateway-internet pc


- Network1 boxes need a default gw to Linux-Box eth0 IP.

- Linux-Box needs default gw to Gateway-InternetPC (which I assume you
did).

- Gateway-InternetPC and Network2 boxes need to use Linux-Box eth1 IP as
gw for 192.168.1.0/24 network (and Gateway-InternetPC needs to masquerade
Network1 along with Network2 to internet).

An alternate to last item would be for Linux-Box to masq Network1 traffic
going out its eth1.

--
David Efflandt - All spam ignored http://www.de-srv.com/
http://www.autox.chicago.il.us/ http://www.berniesfloral.net/
http://cgi-help.virtualave.net/ http://hammer.prohosting.com/~cgi-wiz/
 
Reply With Quote
 
Sean Langley
Guest
Posts: n/a

 
      10-30-2003, 03:27 AM
You are using a 192.168.x.y network for your internal (protected) network...
this is good, but simple ip forwarding doesn't work with private (ie
illegal) addresses. You need to use some form of network address
translation (NAT), probably good to used IP Masquerade. You also need to
implement a set of firewall scripts, read the NAT and IP Filtering HOWTO's

Regards,

Sean
"Andre Nottenkaemper" <(E-Mail Removed)> wrote in message
news:fm3z6jtx06q5$.(E-Mail Removed)...
>
> > Have you enabled IP-forwarding ?
> >
> > echo "1" > /proc/sys/net/ipv4/ip_forward
> >
> > Eggert

>
> yea. thats the only thing i did and which i´m 100% sure i did it right
> i believe i need to add some routes (route add blahblah) but i´m not sure
> how and what i have to set up.
>



 
Reply With Quote
 
 
 
Reply

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
two nics, one ip lastlee@gmail.com Windows Networking 7 07-21-2006 03:03 AM
Using both NICs... Steven Sinclair Windows Networking 2 05-26-2006 07:48 PM
gateway to gateway vpn clients can connect Nick Windows Networking 4 11-11-2004 10:01 PM
2 NICs, same subnet for a 'gateway' that won't block traffic from 'outside' NIC freat Linux Networking 4 03-01-2004 01:43 PM
Windows98 Gateway will not accept static gateway Steve Windows Networking 2 09-21-2003 05:45 AM



1 2 3 4 5 6 7 8 9 10 11