From owner-freebsd-isp@FreeBSD.ORG Tue Jan 13 23:41:16 2004 Return-Path: Delivered-To: freebsd-isp@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A2AB16A4CE; Tue, 13 Jan 2004 23:41:16 -0800 (PST) Received: from correo.tid.es (tidos.tid.es [193.145.240.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id D6A0D43D1D; Tue, 13 Jan 2004 23:41:13 -0800 (PST) (envelope-from igf@tid.es) Received: from conversion-daemon.tid.hi.inet by tid.hi.inet (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) id <0HRG00001XQSE4@tid.hi.inet>; Wed, 14 Jan 2004 08:41:12 +0100 (MET) Received: from tid.es (sophia.hi.inet [10.95.43.243]) by tid.hi.inet (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0HRG003ATYOOKB@tid.hi.inet>; Wed, 14 Jan 2004 08:41:12 +0100 (MET) Date: Wed, 14 Jan 2004 08:43:37 +0100 From: Isaac Gelado To: freebsd-hackers@freebsd.org Message-id: <4004F329.1000902@tid.es> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 8BIT X-Accept-Language: es-es, es, en-us User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.0.1) Gecko/20020823 Netscape/7.0 References: <52975.148.243.211.1.1074063556.squirrel@mail.unixmexico.com> cc: freebsd-isp@freebsd.org cc: nbari@unixmexico.com Subject: Re: Routing Networks X-BeenThere: freebsd-isp@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Internet Services Providers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jan 2004 07:41:16 -0000 Nicolás de Bari Embríz G. R. escribió: > Hi all, I need some help routing or making Nat on a LAN. > > I have something like this: > > > I N T E R N E T > ----------------- > ^ ^ > | | > fxp0 public IP public IP > | | > FreeBSD server LINUX server > | | > dc0 192.168.10.1 | > dc1 192.168.1.1 ^ 192.168.1.3 > ^ | ^ > | | | > | | | > ---------------- > | Switch/Hub | > ---------------- > | | > ------------------ ----------------- > | LAN A | | LAN B | > | 192.168.10.2-254 | | 192.168.1.4-100 | > ------------------ ----------------- > > > What i want to do is that a computer on LAN A with an IP on the range of > 192.168.10.2-254 can ping, telnet, ssh, etc. to a computer on LAN B > "192.168.1.X". > > How can i solve this problem, is this is a route or Nat problem ? I think it is a route problem. You must add next static route: - On the linux machine route all incoming packets with dest addr 192.168.10.x to 192.168.1.1 It shouldn't be necesary a static route on the freebsd machine since it has a network device with an addr of LAN B. Of course you must run a route daemon in both machines (I supouse it's running now since they are working as gateways) and the previous route must be added to the route daemon running on the linux machine. You can allways check that packets are going by the correct way with traceroute. Regards, Isaac -- __________________________________________________________ | Isaac Gelado | | | Telefónica I+D | Tlf 983367649 | | Paq. Tec. de Boecillo | | | Valladolid | igf@tid.es | |_______________________________|__________________________| | As gold which he cannot spend will make no man rich | | so knowledge which he cannot apply will make no man wise | |__________________________________________________________|