From owner-freebsd-questions@FreeBSD.ORG Sat Aug 20 09:03:51 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A2171065672 for ; Sat, 20 Aug 2011 09:03:51 +0000 (UTC) (envelope-from bagadeh@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id D46728FC13 for ; Sat, 20 Aug 2011 09:03:50 +0000 (UTC) Received: by gyd10 with SMTP id 10so3105857gyd.13 for ; Sat, 20 Aug 2011 02:03:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=OpPgD6keM6/2pQzTuyz043xb3HA89yyQ49vgRi3lHD4=; b=TL8feZWcy/wM/dlr44Jf2LnYzp2hjGt9pJxopBL5gRiNePvqXi6hQh77kiSF6GEnSl C5yrmVzrJnwwVrOUOjwNDzWGGBgs3HGnZeitp8oXZ0JY/g2DsSW1qjKaBCFPM1xtqPA1 NanZDo6GFkjV1URYvDTMjWm0QqgmV+HYvVcb4= MIME-Version: 1.0 Received: by 10.150.174.15 with SMTP id w15mr286397ybe.193.1313829493363; Sat, 20 Aug 2011 01:38:13 -0700 (PDT) Received: by 10.151.146.20 with HTTP; Sat, 20 Aug 2011 01:38:13 -0700 (PDT) Date: Sat, 20 Aug 2011 13:08:13 +0430 Message-ID: From: h bagade To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: pf nat with pool addresses X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2011 09:03:51 -0000 Hi all, I am trying to use pf nat rules with pool support on FreeBsd 8.0, working together with ipfw as the main firewall. According to the natting concepts i faced in manuals and docs, nat concept is to map the source address to the natted address when sending the packets from that source and then map the destination address of the related reply packets. but when I define pf nat rules with a pool of IP addresses not available on the outside interface ip addresses, the outgoing traffic is natted to one of the pool addresses but the response is not received via that interface so the pf can map the destination address to the real one. here is one of my configs i used during my tests: *configurations:* *pf.conf:* nat on eth1 from { 11.11.11.0/24} to any -> {172.16.10.1,172.16.10.2,172.16.10.3,172.16.10.4,172.16.10.5,172.16.10.6,172.16.10.7,172.16.10.8,172.16.10.9,172.16.10.10} main system configurations: eth0: 11.11.11.1 eth1: 172.16.10.64 system A: directly connected to eth0- 11.11.11.11 system B: directly connected to eth1- 172.16.10.65 in this configs the dafult route of system A and system B are the middle systems connected ip address. as mentioned, when systemA pings systemB, the ping requests are natted to 172.16.10.1 and received at systemB but systemB doesn't send icmp replies because it doesn't know to whom it should send the replies (no answer to system B 's ARP requests about who has the natted IP). now my question is, isn't it the pf nat responsibilty to manage this condition and send the ARP replies to SystemB? or, are my configs wrong? or i misunderstood the nat concepts? any ideas or helps are really appriciated as i have to set this nat on my main system, asap. Thanks in advance.