[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


PPP server.   Can't ping router. IP forwarding.

Posted on 1997-07-17
Medium Priority
Last Modified: 2010-03-17
I'm trying to setup a ppp dialup server on Linux (2.0.29)/
Debian and am having problems.

I want a Win95 machine to be able to dialup into my linux
box and access the Internet through the linux box which is
connected to a router (internet).

I am able to get the modems to connect and I can ping the
win95 machine from linux and the Win95 machine can ping my
ethernet port. However, I can't get the win95 machine to
ping the router.  So, the Win95 machine cannot access the
Internet (web,etc.), or anything beyond the Linux machine.

Is this an IP forwarding problem?  I'm not sure if I have
IP forwarding turned on or not.  How can I tell?  What does
IP forwarding do anyway?  Does ipfwadm accomplish this? I know ipfwadm is installed.  I know I can access the Internet
from the Linux box w/ no problems. I used debian to install
everything so I can't find any source files around for the
kernel to see if IP forwarding was turned on or not.

Here's my setup:

Internet |
Router: |
eth0:        |
Linux Box                  |
ttyS1 serial port:         |              |
-----------------   |
Win95 machine   |

Does the serial port need its own ip?  Does it have to be a
real IP or can it be a private one?

In my options.ttyS1 (setup for dynamic IP addressing) file
I have:

Is this right?  Or, should it be the ethernet (.2) or
router (.1) address instead of (.3 serial port).  I've
tried all three, and it doesn't seem to matter.  When I
used .1 (router) address I think my linux box got locked
out of the router (couldn't ping the router from linux). I
still can't access the Internet via the WIn95 machine.

Any help would be greatly appreciated.  Everything's been
pretty much setup based on reading the PPP howto, mgetty
stuff, and serial howtos.  If there is addiotional info. needed, please let me know.


Question by:jcw071697

Accepted Solution

sauron earned 600 total points
ID: 1585606
Basically, what you're trying to do is set up a separate small network. Assuming you have enough real IP addresses to go round, you have your router on, your Linux box's ethernet card is Then, you subnet, so you might give the Linux box's PPP interface an IP of Take an example, to use the minimus number of IP's:-


Network Address
Broadcast Address
Subnet Mask

This gives a tiny subnet with only two valid IP's, these are, and, which you assign to your router and you Linux box's ethernet interface.

Then, another subnet:-

Network Address
Broadcast Address
Subnet Mask

This gives two more valid IP's, which are, and

So, to do this you'll need a minimum of 7 real IP addresses. If you don't have that many, you need to use masquerading, in which case you can get away with 2, one each for the router and the linux box. Obviously, if you have the whole class C, you don't need to worry about tiny subnets.

Ok, so having sorted this out, you get your Win95 box to dial into the Linux box, and be given the right IP, subnet, etc. It seems you already have this side of things working. Then, you need to make your Linux box do IP routing (IP forwarding). This means that the Linux box must forward packets coming in on the PPP interface across to the ethernet interface. To turn this on, you need to recompile the kernel with IP forwarding enabled. You need to set up your etc/sysconfig/network file up like so:-

GATEWAY=           (the router)

Then, make sure you can get to and beyond the router from the Linux box.

So, then set up your win95 box. In the TCP/IP properties of the PPP connection, you can set up IP address, gateway, DNS servers etc. The gateway for the Win95 machine is the IP address of the Linux box's PPP interface. This is critical for it to work.

Basically, what you have is two small networks, and two routers - your linux box is also a router, and the Win95 machine doesn't need to know anything at all about the real router.

If you don't have enough IP addresses, the situation is the same, but the Win95 machine and the Linux PPP interfcae should be assigned private net numbers, and the kernel on the Linux box should be compiled with masquerading enabled, as well as IP forwarding.

Hope this helps

Expert Comment

ID: 1585607
Did you tried to add your router IP adress as a gateway in your win95 tcpip configuration.

Author Comment

ID: 1585608
The problem I had turned out to be not having IP forwarding turned on.  So, I recompiled the kernel it all works now.  I did this prior to getting your answer.  But after your answer, it seems that I should have recompiled the kernel (debian linux (2.0.30)) using the "optimize as router" option since you indicated that I am using the Linux box as a router.  I hope
there is not a significant difference between having the linux box optimized as a router v. not optimized.

Thanks for the answer you gave me.

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

873 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