• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

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

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
niges
Asked:
niges
  • 6
  • 5
1 Solution
 
mirek071497Commented:
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
 
nigesAuthor Commented:
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
 
mirek071497Commented:
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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
tim_lbiCommented:
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
 
mirek071497Commented:
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
 
nigesAuthor Commented:
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
 
mirek071497Commented:
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
 
nigesAuthor Commented:
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
 
nigesAuthor Commented:
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
 
nigesAuthor Commented:
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
 
mirek071497Commented:
No you don't need, however mayby you have wrong settings in the firewall ?

0
 
nigesAuthor Commented:
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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now