Solved

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

Posted on 1998-07-25
12
281 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
  • 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
 
LVL 1

Accepted Solution

by:
tim_lbi earned 50 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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 your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now