Date: Thu, 16 Oct 2008 18:34:46 +1100 (EST) From: Ian Smith <smithi@nimnet.asn.au> To: Lin Zhao <linzhao@ustc.edu.cn> Cc: freebsd-ipfw@freebsd.org Subject: Re: pls help on 2 public ip Message-ID: <20081016174847.U4254@sola.nimnet.asn.au> In-Reply-To: <424063004.07284@ustc.edu.cn> References: <424063004.07284@ustc.edu.cn>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 15 Oct 2008, Lin Zhao wrote: > hi all > > we have a simple network > > |-------------| > internal network---------| freeBSD |----------public network > rl0/192.168.0.1|-------------|fxp0/a.b.c.1 > a.b.c.2? > > currently 192.168.0.0/24 is natd to a.b.c.1, and i want to use another public ip > (a.b.c.2) for some special websites, such as www.abc.com. > > how can i configure the ipfw? > should i use alias ip or another nic? If a.b.c.2 is a separate box from a.b.c.1 you'll likely want a separate segment, ie on another nic. If the same box, you can use an fxp0 alias. Looks like you could probably use a slightly modified 'simple' ruleset in rc.firewall as a starting point - though you'll want to enable ICMP (see examples in the 'workstation' rules) and probably replace 'me' with the specific a.b.c addresses in rules for the various services offered. How is fxp0 connected to the public network? Via another router? Or eg PPPoE over ADSL? It may matter in terms of whether your uplink is via a single address - that is, is a.b.c.2 reachable directly from the public internet, or only via a.b.c.1? How many public IPs have you (netmask)? cheers, Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081016174847.U4254>