Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Using Linux box as gateway to the internet for a win98 box on LAN>

Posted on 1998-07-25
12
Medium Priority
?
297 Views
Last Modified: 2013-12-15
I would like to know how I am able to use my linux box, which I connect to the net using ppp-on scripts, as a gateaay for my other pc which runs win98 on a lan. There are only 2 computers on the lan, the address of the linux box is 192.168.1.1 and the address of the win98 box is 192.168.1.2  each box can ping each other, and tcp/ip is set up on both...  My isp has a proxy server aswell...  Aany help would be appreciated.......

--Nige
0
Comment
Question by:niges
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
12 Comments
 
LVL 3

Expert Comment

by:mirek071497
ID: 1628606
Of course you can. You must setup masquerade at the linux.
1.Linux as a gateway 192.168.1.1 netmask 255.255.2555.0
and other PC's 192.168.1.XXX
2.You must add IP Addr to your Eth0 card. You can do this with ifconfig command. Eth can have more than one addres.
3.You must setup firewall for this and add masquerade options. This is complete described in the masquerade HowTo.
Tell us what is going wrong, because I had no problems with setting up this.
0
 
LVL 1

Author Comment

by:niges
ID: 1628607
I haven't tried to do this yet, I didn't knw about masquerading... I will have to try it out toniught when I get home.. Is there anything special I should do on the network settings on the win98 box???

So it is all in the masquerade how to...

thanks I will have to have a look at it...

--Nige

ps will keep you informed of my pregress....

will award pioints to you/anyone else who helps me getting it going, when it is done!!!


0
 
LVL 3

Expert Comment

by:mirek071497
ID: 1628608
It is very easy.
On the Linux You must setup masquerade and on the win side you must setup TCPIP.
To Setup TCPIP on win you must assign IP address(192.168.1.2), Linux IP as the gateway(192.168.1.1) and of course you must assign at least one IP of the DNS serwer.
You can assign My Serwer IP for the testing  (157.158.209.225) however this is in poland so please find another which is nearest to you.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Accepted Solution

by:
tim_lbi earned 150 total points
ID: 1628609
1. On your Windows box set as gateway and nameserver your linux box
2. On linux box make sure your kernel is compiled with IP-Forwarding,IP-Masquerading
    After connecting to internet use: ipfwadm -F -a masq -S 192.168.1.2 -D 0/0
    to masq your Windows box..


0
 
LVL 3

Expert Comment

by:mirek071497
ID: 1628610
if you don't plan to run bind on your linux you can't assign linux ip to the nameserwer :(
If you need linux only as a gateway than it is good idea to disable all what you can, because manu hackers is available on the net :)) (today new bind is not vurnelable but only when you path him)
0
 
LVL 1

Author Comment

by:niges
ID: 1628611
I have done all this and yet it is still not working?? What am I doing wrong??

I have done al the settings in the win95 box the same as you guys said, and the same in the linux box, nut all I can ping from the win95 box is this linux box, and no further...??


0
 
LVL 3

Expert Comment

by:mirek071497
ID: 1628612
so You are without connection from win to Linux ? than this is not the firewall setting or masquerade. You must have some mistakes with IP addresses or with Eth cards.
Please check cables and IP of Linux and IP of the gateway in Windows.
0
 
LVL 1

Author Comment

by:niges
ID: 1628613
As I said before, there is no problem with the connection....

I am able to talk from one computer to the other without any problem at all. Both ethernet cards are setup prefectly, and tcp/ip works like a dream. The problem is getting the win95 box to use the linux box as a gateway to the internet when the linux box is connected......
0
 
LVL 1

Author Comment

by:niges
ID: 1628614
The gateway in windows is right, set to 192.168.1.1 which is the ip of the linux box. If I am in windows, I can ping 192.168.1.1 and it works, and I can ping 192.168.1.2 (win box) from the linux box and it works aswell..

I think my problem is that I recompiled the kernel, and the old kernel have everything but ip-forwarding, so I compiled a new one with that in it, and the compile didn't work, so I used the old one again, which I guess you NEED ip-forwarding for it to work, the old kernel, had everything but ip-forwarding in it...

I just downloaded 2.0.35 and compiled and installed it, but am yet to test it, will let you all know of my progress..
0
 
LVL 1

Author Comment

by:niges
ID: 1628615
I also have another question..

I have got ip_masq working, but I am unable to login to another mail server from the win95 box??  Do I need support for pop servers in the ip_masq siomewhere???

--Nige

0
 
LVL 3

Expert Comment

by:mirek071497
ID: 1628616
No you don't need, however mayby you have wrong settings in the firewall ?

0
 
LVL 1

Author Comment

by:niges
ID: 1628617
Well thankyou all. I have it fixed now, and it all works...

Although I made a script that starts off with depmod -a  and when this executes it says, NOT AN ELF FILE.. It never used to do this, now it does, I have no idea why??

Well thankyou for help.. I will award 2 of you with points, so Mirek, I have posted a question in here for you to answer, and have awarded other points here..

--Nige
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question