From owner-freebsd-net@FreeBSD.ORG Fri Feb 13 20:27:03 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0F6D1D5 for ; Fri, 13 Feb 2015 20:27:03 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B4DA96A1 for ; Fri, 13 Feb 2015 20:27:03 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t1DKR31Q090385 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Feb 2015 12:27:03 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t1DKR2qZ090384; Fri, 13 Feb 2015 12:27:02 -0800 (PST) (envelope-from jmg) Date: Fri, 13 Feb 2015 12:27:02 -0800 From: John-Mark Gurney To: vinay saini Subject: Re: Configuration if two eth port in freebsd Message-ID: <20150213202702.GN1953@funkthat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Fri, 13 Feb 2015 12:27:03 -0800 (PST) Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Feb 2015 20:27:04 -0000 vinay saini wrote this message on Fri, Feb 13, 2015 at 19:55 +0530: > I have installed freebsd on a physical machine with two ethernet cards.Now > my plan is to connect em0 port in our LAN network without static IP and em1 > port with my laptop with the static IP. > > em1 ---> LAN Network(without static IP) > em2 ---> Laptop (with static IP ex:192.168.12.111) > > Now I would like to access the that server using this static IP ie. > 192.168.12.111 on my laptop. > > Is there any way I can do this.Please help me how may I configure my > ethernet settings. If the network knows that your static ip/network is located off of your box, just need to turn on forwarding, and every thing will just work... I assume though, that you don't control the LAN Network, and so it won't know that the static is located at your box... If your network admin lets you, you could run routed or similar routing protocol to announce the route, but your lan admin will probably not like you for that... The other way is to use nat... Look at the handbook for configuring either ipfw or pf for nat: https://www.freebsd.org/doc/handbook/firewalls.html -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."