From owner-freebsd-pf@FreeBSD.ORG Wed Jun 24 19:33:30 2009 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84F6C106566C for ; Wed, 24 Jun 2009 19:33:30 +0000 (UTC) (envelope-from fayerwall@gmail.com) Received: from mail-pz0-f174.google.com (mail-pz0-f174.google.com [209.85.222.174]) by mx1.freebsd.org (Postfix) with ESMTP id 589CE8FC18 for ; Wed, 24 Jun 2009 19:33:30 +0000 (UTC) (envelope-from fayerwall@gmail.com) Received: by pzk4 with SMTP id 4so66388pzk.3 for ; Wed, 24 Jun 2009 12:33:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=xocU82jjT+J/rz3K0YwEoCEPrH3Lb98lxizhsgp3PTg=; b=Bn2oK87dFOKZbPr2EY00qHXPVRejXeRzr0ttsOLxAA3SJ0YIPjdiOUZcbbSM6Kg2a2 s1m6HjhIy6Ywwhp7pz9ir0+fJoEty4Hy8L67T/srsv7HaQhFzn3syltO9oM7ornEflaH Ze1E9CCAuspUU5Jtc/WDftF5H1r1x/RFr5QEY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=gkWIxZbXJiAWpKUA5J3E6KEzo2CIolilDxV7xfkndTErBcth/cQt2GHh/WRV9spy4w ufoquk7N346Nh+WbLZASRtIcU/hYQ2KgzNBnld9CQSdSUFRMnXRLfpWWtUC3kTickD+b a5DrLxYoJvylvtuEwvAToRg9pJhzvN6K0K4eA= MIME-Version: 1.0 Received: by 10.143.18.21 with SMTP id v21mr562885wfi.84.1245872009852; Wed, 24 Jun 2009 12:33:29 -0700 (PDT) In-Reply-To: <014301c9f4fb$bb7893e0$3269bba0$@net> References: <014301c9f4fb$bb7893e0$3269bba0$@net> Date: Wed, 24 Jun 2009 12:33:29 -0700 Message-ID: From: Fire walls To: freebsd-pf@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: OpenVPN Client Nat question? X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jun 2009 19:33:30 -0000 On Wed, Jun 24, 2009 at 11:43 AM, Torsten Kersandt wrote: > -----Original Message----- > From: owner-freebsd-pf@freebsd.org [mailto:owner-freebsd-pf@freebsd.org] > On > Behalf Of Fire walls > Sent: 24 June 2009 16:53 > To: freebsd-pf@freebsd.org > Subject: OpenVPN Client Nat question? > > Hi people. > > Working with pf, every day I'm understanding more pf. > > I have openvpn at work running on gentoo, I add my openvpn in my home FW > with freebsd 7.2, I setup everything and is working, I can reach my work > network. > > I read some sites on internet about this setup and they say something > about NAT the openvpn network but doesn't explain if this must be done just > in the server side or both sides, I mean server + client. > > In my case I'm a client, I have to NAT my vpn network? > > nat on $ext_if from $vpn_network to any -> ($ext_if) > > Or just need to play with the pass/block rules? > > Thanks all for your time!!! > > -- > :-) > _______________________________________________ > freebsd-pf@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-pf > To unsubscribe, send any mail to "freebsd-pf-unsubscribe@freebsd.org" > > This is what I have got on my boxes > Openvpn.conf: > server 10.12.215.0 255.255.255.0 > ifconfig-pool-persist /usr/local/etc/openvpn/ipp.txt > > # Certificates for VPN Authentication > ca /usr/local/etc/openvpn/keys/soundnet/ca.crt > cert /usr/local/etc/openvpn/keys/soundnet/ca.crt > key /usr/local/etc/openvpn/keys/soundnet/ca.key > dh /usr/local/etc/openvpn/keys/soundnet/dh1024.pem > > # Routes to push to the client > push "route 192.168.100.0 255.255.255.0" > push "dhcp-option WINS 192.168.100.12" > push "dhcp-option DNS 192.168.100.12" > push "dhcp-option DNS 192.168.100.12" > push "dhcp-option DOMAIN home" > > pf.conf > vpn_if="tun0" > vpn_network="10.12.215.0/24" > > nat on $ext_if from $vpn_network to any -> ($ext_if) > nat on $int_if from $vpn_network to $int_net -> ($int_if) > > pass in quick on $vpn_if > pass out quick > > regards > Torsten > > > Hi Torsten. Hey but this config is for the server side right? What questions is, if I have have to NAT to in the client side? Thanks for your quick answer!!! -- :-)