Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Oct 1996 23:03:06 +0300
From:      petri.riihikallio@hut.fi (Petri Riihikallio)
To:        questions@freebsd.org
Subject:   Re: IP forwarding not working
Message-ID:  <v01530502ae77259823bb@[194.100.45.30]>

next in thread | raw e-mail | index | archive | help
# The original question was how to turn FreeBSD 2.1.5 to a router between
# Ethernet and PPP. I received a private mail message from a person who
# did get it to work after similar problems. /Petri

>I am trying to remember what I did exactly.  I have the 'gateway' equal
>to "YES" in /etc/sysconfig.

It calls sysctl -w net.inet.ip.forwarding=1. This is supposed to turn on
forwarding between interfaces. I have it, too.

>The problem may be related to your routing.  Have you set your ethernet
>machine(s) to have a  default route of your FreeBSD box, and have you
>set the FreeBSD box to have a default route of the PPP interface
>(actually the remote IP at the other end of the PPP link)?

Ther ethernet machine has the IP adress of the ed0 interface as its default
route. I can verify this as I can see the packets addressed outside arrive at
the FreeBSD box ethernet interface.

The FreeBSD starts pppd with defaultroute-option, so pppd puts a default route
to the routing table as the link comes up and removes it when the link goes
down. This works, as the FreeBSD box can talk to the outside world. It just
won't forward any trafic.

>Send me the results of 'netstat -rn' and I will have a look if you like.

$ netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif Expire
default            194.100.0.158      UGc         1        8      ppp0
127.0.0.1          127.0.0.1          UH          0        0       lo0
194.100.0.158      194.100.45.30      UH          2        5      ppp0
194.100.45/27      link#1             UC          0        0
194.100.45.1       0:40:10:0:1e:8d    UHLW        1       97       ed0    309

- Default route is to 194.100.0.158, which is at the other end of the ppp link.
  This route was installed by pppd.
- 194.100.45.30 is my end of the ppp link.
- 194.100.45./27 is my ethernet network
- 194.100.45.1 is the lonely Mac sitting on it.

This all looks and works great. Just that forwarding doesn't. If you have any
ideas they are _very_ welcome.

Cheers
Petri

--
Petri.Riihikallio@hut.fi





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v01530502ae77259823bb>