LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 07-25-2001, 04:33 PM   #1
inbar
LQ Newbie
 
Registered: Jul 2001
Posts: 3

Rep: Reputation: 0
Question Setting up a Linux gateway machine


Hello Sir,

I installed Linux Red Hat 7.1 on my physical gateway.
I can surf the Internet from the Linux.
I can not surf the Internet from the client connected to it.
I get replys when I ping LAN computers from the client.
Could u please tell me what to do?
Please be extremely specific; I am new to this operating system.

Thanks,

Inbar
 
Old 07-25-2001, 05:00 PM   #2
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
Here is an excellent IPMasq resource:
http://ipmasq.cjb.net/

Specifically, this document will cover the 2.4 kernel in Redhat v7.1:
http://www.e-infomax.com/ipmasq/howt...tml/index.html

Its very detailed with step by step instructions. There is an offline copy that you can download and print at the above site.

Have fun.

KevinJ
 
Old 07-25-2001, 08:23 PM   #3
dilberim82
Member
 
Registered: Apr 2001
Location: NY
Distribution: used to be Redhat, now Debian Sarge
Posts: 291

Rep: Reputation: 30
I just found that site today while i was bored out of my mind from surfing the net, and i printed it and my boss caught me . I just thought i would share it with you.
 
Old 07-28-2001, 03:40 PM   #4
sancho5
Member
 
Registered: Jul 2001
Location: Utah
Distribution: RedHat v7.3, OpenBSD 3.3, FreeBSD 5.0
Posts: 327

Rep: Reputation: 30
is it neccesary to use IP Masq in that instance, or can you just tell the machines behind the linux box to use the Linux host as the default gateway? Seems it should route the web traffic just fine that way.. and if not so, for what reasons?
 
Old 07-29-2001, 02:00 PM   #5
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
It is necessary to use IPMasq if the clients behing the gateway are using private IP addresses. If there are "real" registered IP addys on clients.. then the gateway machine can simply act as router.
 
Old 07-30-2001, 02:51 PM   #6
funkup
LQ Newbie
 
Registered: Jul 2001
Location: lancashire, uk
Distribution: mdk 8, seawolf, openbsd.
Posts: 29

Rep: Reputation: 15
what you can do is also (if you are on dialup) to have it dial on demand so when you request an external site / ip then it connects for you

i think the app is called diald if im not mistaken and obtainable from freshmeat.
 
Old 07-30-2001, 02:57 PM   #7
inbar
LQ Newbie
 
Registered: Jul 2001
Posts: 3

Original Poster
Rep: Reputation: 0
Hi guys,

Thanks for your kind help.

KevinJ, could u please tell me what to do if the clients' IPS are

not "real."

The tool, which u advised me to use is not helpful, since the client

IPS are not registered IPs.

Thanks,

Inbar
 
Old 07-30-2001, 03:18 PM   #8
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
Actually, the links I posted above on IPMasq are exactly what you need.

I recommend using something with the 2.4 kernel as your OS. I use Redhat v7.0 with a 2.4 upgrade, but I am going to go to v7.1 with the new machine I am building.
Your gateway will need two interfaces: one modem and one nic, or two nics. One interface will connect to your ISP as normal, the other will connect to an internal network using something like the 192.168.x.x subnet.

The Linux machine will route packets between the Internet and your internal network. It will use IPMasq to translate the internal IP traffic into external IP traffic, and vice versa, for the clients inside.

At its simplest level, it will require minimal configuration of the iptables (one or two lines I think) and I believe a kernel recompile from a stock RHv7.1 install.

In addition, you will want to brush up on general security documentation to protect yourself from intrusion and DOS attacks. Just Keep It Simple and don't turn anything on you don't need and you should be fine.

KevinJ
 
Old 07-31-2001, 07:56 AM   #9
pros
LQ Newbie
 
Registered: Jun 2001
Distribution: RH 7.1
Posts: 5

Rep: Reputation: 0
Kevin,

Why would we require to do a build on the kernel? I can't think of any reason.

Cheers,

Antony
 
Old 07-31-2001, 11:51 AM   #10
Glen
LQ Newbie
 
Registered: Jul 2001
Location: Manila, Philippines
Distribution: Redhat
Posts: 1

Rep: Reputation: 0
Wink

I am assuming you are using Windows as client.
Check your client DNS and Gateway settings. Gateway should point to your Linux box. You can use the same DNS you configured in the Linux box.
 
Old 07-31-2001, 12:59 PM   #11
KevinJ
Member
 
Registered: Feb 2001
Location: Colorado Springs, CO
Distribution: Redhat v8.0 (soon to be Fedora? or maybe I will just go back to Slackware)
Posts: 857

Rep: Reputation: 30
Quote:
Originally posted by pros
Kevin,

Why would we require to do a build on the kernel? I can't think of any reason.

Cheers,

Antony
I don't know if the stuff you need for IPTables/IPmasq is included in the install kernel. As I said before, I am using an RHv7.0 install with a 2.4 kernel.. so I had to do one most certainly.

I have a couple of RHv7.1 boxes.. but they aren't acting as gateway. If the forwarding/firewall mechanisms are included in the default kernel.. then a recompile is not required.

OTH ....
1. I recommend everyone learn how to recompile a kernel. Its a great exercise.

2. Recompiling the default kernel to remove all the junk included that you will never use is probably a good idea in the first place.
 
Old 07-31-2001, 01:28 PM   #12
inbar
LQ Newbie
 
Registered: Jul 2001
Posts: 3

Original Poster
Rep: Reputation: 0
Hi Kevinj,


After I checked with the system administrator, it turned out the clients' IPs are real IPs, not private IPs; these are real IPs provided by the ISP.
According to what u said above, the IPMASQ tool would have solved the problem mentioned above if the clients' IP were private.
Just tell me if I still need to use this tool if the clients' IPs are real IPs, provided by the ISP.
If I do not need this tool, maybe I am doin' somthing wrong with the client configuration as is mentioned above?

Thanks,

Inbar
 
Old 07-31-2001, 02:50 PM   #13
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Have you enabled IP forwarding on the gateway with
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
Otherwise it doesn't matter wether your clients are setup right or not, the linux box ain't gonna forward traffic for you.

cheers

Jamie...
 
Old 07-31-2001, 03:08 PM   #14
dilberim82
Member
 
Registered: Apr 2001
Location: NY
Distribution: used to be Redhat, now Debian Sarge
Posts: 291

Rep: Reputation: 30
You cannot use IP masq if you have a real ip. So you have to set your box as a router. And I installed RH7.1 like 4 times now and i had to rebuild the kernel in order to do ip masq. www.ipmasq.cjb.net tells you everything step by step on how to get it working...
 
Old 07-31-2001, 03:17 PM   #15
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
Quote:
Originally posted by dilberim82
You cannot use IP masq if you have a real ip.
Well you can, you just don't need to.

cheers

Jamie...
 
  


Reply



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 access internet from a linux machine via a linux machine as gateway b0nd Linux - Newbie 5 03-21-2005 11:59 AM
Downloading email with gateway linux machine colabus Linux - Newbie 1 06-20-2004 07:37 PM
Setting up a gateway on Debian machine colabus Linux - Networking 0 05-22-2004 10:16 AM
Configuration DHCP and Gateway on linux machine zowey Linux - Networking 4 04-03-2004 02:17 PM
how do i use my linux machine to be a gateway for a windows machine? Sanjuro Linux - Networking 2 02-09-2002 04:29 AM

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

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