LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Linux Gateway+Two NICS+Router+HOWTO (https://www.linuxquestions.org/questions/linux-networking-3/linux-gateway-two-nics-router-howto-226268/)

pin_bk 09-03-2004 03:04 PM

Linux Gateway+Two NICS+Router+HOWTO
 
Hi I am trying to set up my Linux server as a gateway. I have two Network Card in the Linux server. The first eth0 I am using for my internal netowk, the second network card eth1 I am using for the connection with the Router. The Router manages the internet. The router owns the public IP and manages NAT. I just need to thel my Linux server to route packets from etho throught eth1 to the Router.

eth0 - 10.40.0.10
eth1 - 10.40.0.9
Router - 10.40.0.1

How and what?

You must be aware that both NICK must be accessible from the hub!

All The Best

btmiller 09-03-2004 03:18 PM

Check the IP Masquerading HOWTO at the Linux Documentation Project. It should tell you everything you want to know. If you are using a 2.6 kernel, follow the directions for 2.4.

pin_bk 09-03-2004 03:24 PM

what is the idea? I dont know what to search for!

NLR 09-03-2004 03:38 PM

You will need to read the full HOWTO, it goes though how to set it up linux so it will "forward" the packets to and from the Internet network and how to set up the other machines to use the "Gateway" (the machine you set IP Masquerading on)

Andrew

pin_bk 09-03-2004 03:45 PM

I really don't have the time to read so much text...If you really don't want to help, then do not post such answers. If comeone can give me fair answer how and what I am gonna apriciate it..thanx

All tHe Best to the good people of the linux community

pin_bk 09-05-2004 01:23 PM

anyone?

Mara 09-05-2004 03:08 PM

Do you really need to have both subnets (router + server and server+other machines) in one network? I'd keep router and ethX (the one conected to router) as they are and change the rest of IPs to something like 10.0.1.x (and change both netmasks to 255.255.255.0).

pin_bk 09-06-2004 01:42 PM

I have had that configuration u suggested me, but is it actually possible to do it on the way that you have tow NICs in the same subnet - the same ip naming?

reetep 09-06-2004 02:29 PM

may i ask why you want to route everything through your linux box?

As you said yourself, the router handles NAT. Unless you're setting up a proxy server or something it doesn't sound like you need it....

pin_bk 09-06-2004 02:47 PM

I have a cisco 805 router which doesnt support bandwidth limiting. I want to limit my users to 90MB a day. You get the point, and on the linux server I have got the proxy also.

pin_bk 09-06-2004 02:51 PM

And on the linux server, you have so much posibilities then on a cisco 805 router. From all sort of caching options, control, we interfaces for users, I like that kind of chalenge to develop my own network system...heh :)

reetep 09-07-2004 12:29 PM

Ok I understand - just didn't want to see you going up the wrong path believing you need the linux box if all you wanted was NAT.

I have done something similar to what you want - I have a masquerading box with a firewall, proxy (squid) and an internl webserver. Don't be put off by the length of the ldp massquerading howto - it deals with three cases simultaneously: 2.0 kernel, 2,2 kernel and 2.4 kernel, each different. It also contains a fair bit of troubleshooting help at the end. If you cut it down to a 2.4 kernel document it's very short. If you don't need to recompile the kernel, it takes ten minutes. I really think you should go there; I found it to be a very useful document indeed.

I haven't seen the bandwidth limiting howto, but maybe you should check it out, and then post your problems and questions here. I'm not sure that your solution can be written down in just five or six lines of a forum post. I'm not saying this to be dismissive; I'm saying this because people will be more likely to help if you post with a specific problem rather then asking them to write down a whole lot of stuff that's already been written down.

If you want help configuring squid, I may be able to help you with that, (I don't know it inside-out - just enough to achieve what I wanted to - so I can't guarantee help); I'd certainly be willing to share my working config file.

Good luck,

reetep.


All times are GMT -5. The time now is 12:18 AM.