We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now


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

niges asked
Medium Priority
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 and the address of the win98 box is  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.......

Watch Question

Of course you can. You must setup masquerade at the linux.
1.Linux as a gateway 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.


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...


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!!!

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(, Linux IP as the gateway( and of course you must assign at least one IP of the DNS serwer.
You can assign My Serwer IP for the testing  ( however this is in poland so please find another which is nearest to you.
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
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)


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...??

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.


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......


The gateway in windows is right, set to which is the ip of the linux box. If I am in windows, I can ping and it works, and I can ping (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..


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???


No you don't need, however mayby you have wrong settings in the firewall ?


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..

Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.