Date: Thu, 3 Feb 2005 22:03:53 +0200 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Erik Norgaard <norgaard@locolomo.org> Cc: freebsd-questions@freebsd.org Subject: Re: Multiple loopback interfaces Message-ID: <20050203200353.GD19067@gothmog.gr> In-Reply-To: <4202813D.8050306@locolomo.org> References: <4202813D.8050306@locolomo.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-02-03 20:53, Erik Norgaard <norgaard@locolomo.org> wrote: > I need to setup a testing environment to properly test a new firewall > ruleset, usually I'll install it on the machine and test it in a > closed environment, but this time I don't have the machine. > > Is it posible or advisable to create multiple loopback intefaces or > are there other suggestions on how to do this? Yes, it is possible. You can even use non-127.0.0.x addresses (lines wrapped to fit in 80 columns): % gothmog:/root# ifconfig lo1 plumb % gothmog:/root# ifconfig lo1 10.6.0.1/24 up % gothmog:/root# tcpdump -s 100 -i lo1 -qvlnn & % [1] 23432 % tcpdump: listening on lo1, link-type NULL (BSD loopback), % capture size 100 bytes % gothmog:/root# ping -c 2 10.6.0.1 >/dev/null 2>&1 ; sleep 01 % 22:02:01.823069 IP (tos 0x0, ttl 64, id 5813, offset 0, flags [none], % length: 84) 10.6.0.1 > 10.6.0.1: icmp 64: echo request seq 0 % 22:02:01.827119 IP (tos 0x0, ttl 64, id 5814, offset 0, flags [none], % length: 84) 10.6.0.1 > 10.6.0.1: icmp 64: echo reply seq 0 % 22:02:02.833529 IP (tos 0x0, ttl 64, id 5827, offset 0, flags [none], % length: 84) 10.6.0.1 > 10.6.0.1: icmp 64: echo request seq 1 % 22:02:02.833568 IP (tos 0x0, ttl 64, id 5828, offset 0, flags [none], % length: 84) 10.6.0.1 > 10.6.0.1: icmp 64: echo reply seq 1 % gothmog:/root# ifconfig lo1 unplumb % gothmog:/root#
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050203200353.GD19067>