Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Sep 2005 06:06:18 +0000
From:      Leonidas Tsampros <ltsampros@upnet.gr>
To:        freebsd-questions@freebsd.org
Subject:   Re: Strange (newbie) Gateway Errors
Message-ID:  <20050910060618.GA2199@bifteki.lan>

next in thread | raw e-mail | index | archive | help
On Fri, Sep 09, 2005 at 08:58:41PM -0400, Thomas Dimson wrote:
> Hi,
> 
> Sorry if this is out of place, but I am having an issue with forwarding 
> packets on my freebsd-current box from a windows PC.
> 
> Here what I'm trying to do:
> I have two network cards, one on a university network and one going to a 
> router, which is connected to a cable modem. Both cards use the vr driver. 
> University is configured through DHCP, private router is just specified (
> 192.168.1.110 <http://192.168.1.110>). I am trying to route traffic to the 
> internet through the router while keeping all university traffic internal. 
> 
> Problem: 
> I run a traceroute from my freebsd box to the university network and it 
> works fine. I can access the website (129.97.128.40 <http://129.97.128.40>) 
> through the internal network. However, using my windows PC - with the 
> freebsd server specified as a gateway - it just times out when trying to 
> connect to the web site. Any website on the internet works fine, but not the 
> intranet. 
> 
> Here is my config, I am just setting a static route to the ip of the website 
> to test for now:
> netstat -r
> Routing tables
> 
> Internet:
> Destination Gateway Flags Refs Use Netif Expire
> default 192.168.1.1 <http://192.168.1.1>; UGS 0 119789 vr0
> localhost localhost UH 0 0 lo0
> 129.97.128.40/32 <http://129.97.128.40/32>; cn-rtrev-res15net. UGS 0 12 vr1
> 192.168.1 link#1 UC 0 0 vr0
> 192.168.1.1 <http://192.168.1.1>; 00:20:78:ce:cb:b4 UHLW 2 154 vr0 1172
> 192.168.1.107 <http://192.168.1.107>; 00:11:95:5d:0b:7f UHLW 1 210110 vr0 945
> 
> Internet6:
> Destination Gateway Flags Netif Expire
> localhost localhost UH lo0
> fe80::%vr0 link#1 UC vr0
> fe80::20d:88ff:fe7 00:0d:88:7f:42:d0 UHL lo0
> fe80::%vr1 link#2 UC vr1
> fe80::211:95ff:fee 00:11:95:e2:57:40 UHL lo0
> fe80::%lo0 fe80::1%lo0 U lo0
> fe80::1%lo0 link#4 UHL lo0
> ff01:: localhost U lo0
> ff02::%vr0 link#1 UC vr0
> ff02::%vr1 link#2 UC vr1
> ff02::%lo0 localhost UC lo0
> 
> Can anyone provide me with aid, or at least the location of a log file for 
> the gateway functions of the machine?

Try to add gateway_enable="YES" in /etc/rc.conf and run either

# /etc/routing start    [as root]

or reboot the pc.

Actually , when you want your freebsd to act as a gateway , you have
to set the sysctl variable net.inet.ip.forwarding to 1.  However , the
gateway_enable options takes care of this.





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