Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 May 1998 21:50:15 -0600
From:      Wes Peters <wes@softweyr.com>
To:        Evren Yurtesen <yurtesen@ispro.net.tr>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: router
Message-ID:  <35567577.3AFFEA12@softweyr.com>
References:  <Pine.LNX.3.96.980511021303.19737A-100000@avrasya.ispro.net.tr>

next in thread | previous in thread | raw e-mail | index | archive | help
Evren Yurtesen wrote:
> 
> how can I use freebsd like a router between 2 interfaces
> or gateway
> like ed0 and ed1 ?
> hmm, my network configuration is like
> ed1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         inet 195.174.18.16 netmask 0xffffff00 broadcast 195.174.18.255
>         ether 00:80:48:eb:ac:2b
> ed0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         inet 192.168.1.1 netmask 0xffffff00 broadcast 192.168.1.255
>         ether 00:20:18:10:86:1b
> I want to connect my windows boxes to ed0
> and set gateway to 192.168.1.1
> 
> hmm how can I do that?
> I tried it with natd and ipfw and it is working
> but I want to do it withoud using ipfw!
> how can I do it?

In /etc/rc.conf, setup your machine to be a gateway:

   ### Network routing options: ###
   defaultrouter="204.68.178.2"    # Set to default gateway (or NO).
   static_routes=""                # Set to static route list (or leave empty).
   gateway_enable="NO"             # Set to YES if this host will be a gateway.

Change gateway_enable to "YES".  This will turn on IP packet forwarding
on the next system boot.  In the meantime, you can turn it on (as root)
with:

   sysctl -w net.inet.ip.forwarding=1

-- 
       "Where am I, and what am I doing in this handbasket?"

Wes Peters                                                 Softweyr LLC
http://www.softweyr.com/~softweyr                      wes@softweyr.com

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message



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