From owner-freebsd-questions@freebsd.org Tue Apr 18 19:17:19 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 23BBDD420D8 for ; Tue, 18 Apr 2017 19:17:19 +0000 (UTC) (envelope-from ultima1252@gmail.com) Received: from mail-yw0-x236.google.com (mail-yw0-x236.google.com [IPv6:2607:f8b0:4002:c05::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D6E716D5 for ; Tue, 18 Apr 2017 19:17:18 +0000 (UTC) (envelope-from ultima1252@gmail.com) Received: by mail-yw0-x236.google.com with SMTP id u70so1109997ywe.2 for ; Tue, 18 Apr 2017 12:17:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=cM7FBJzKLolKZ2Idr0uyyuwADlwdEFd1xMNZ9PoP/u4=; b=oJaFBpDSvKIpPUPk2S82mIa8EFi+l4lIdiR3A70kGau/6RocQYB7d9dWseiwbboNKR sR3L4mrsXbBQDMFXlQ2VUgbP3V24Ro3fabTQePVQzyruDefI/zHuYQ2dZXsWOOIU7MMa 6zKgcaS2FWxysfueaHDCbBWj5sn8Y1uH1HSYHSY1O9YqUTkWoAn2uMOGDM0hPBJzm7S0 xiPx/xZZQ+/DtX3LIkOZe3r2hFjui7qfxjDIEYbCiK9G4CskcHV9mx0hMgraoHyxseag 3tJTpuctuXq9tRv4dAbKah/MkjcBp8i61Y3gHN8jYVF7R4cp2fszW1yqRRAbK+UQVapI Yt9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=cM7FBJzKLolKZ2Idr0uyyuwADlwdEFd1xMNZ9PoP/u4=; b=fde+9ar9jHrtSEU2gWDMoXK5xHx7EOY4GpiSjzAiC8JusojJ1g7R19TNjLpVBFqyou pbSsbTOvita5sCBYenZoKoD60y5YzRJpnj1gLAiZLGOuNoAjPWWdmwLXGzHhCoj/7wG7 /43sBkdw+64OQhZzL8XWikYzJFK97mzBVKO5zzB36kR6w2wmHGQpumxWunAhdctnlkYz Q0lF2H1shgMXkDozXfOf5cxVREOGO90GZ/V/q03GiZpF5oBhT0hzRGjCNXiLWf2EDnTj 0e4gSXVif81frO62SAUljpaRWywx7obFdz9rrQNnVMPnQsaA2/yiooLwPS5z4HPf36tt 3IWA== X-Gm-Message-State: AN3rC/6Nw8gcqZacFumQLMHXBPWqe0ydD0LhiyVmY91Yuyr6gJEJi0o9 K8CUQx1ukKltStpao7l+Faj0vQkRnQ== X-Received: by 10.13.235.144 with SMTP id u138mr23252009ywe.322.1492543037923; Tue, 18 Apr 2017 12:17:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.72.144 with HTTP; Tue, 18 Apr 2017 12:17:17 -0700 (PDT) In-Reply-To: References: From: Ultima Date: Tue, 18 Apr 2017 15:17:17 -0400 Message-ID: Subject: Re: freebsd 10.3, pf, and openvpn To: David Mehler Cc: freebsd-questions Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2017 19:17:19 -0000 I didn't have time to read and look through this entire post, but I think I know the issue you're running into and this suggestion should push you in the right direction. this rule for example, rdr on $ext_if inet proto udp from any to any port 1194 -> $vpn port 1194 rdr on $ext_if inet proto tcp from any to any port 1194 -> $vpn port 1194 # reflect for internal hosts rdr on $int_if inet proto udp from any to any port 1194 -> $vpn port 1194 rdr on $int_if inet proto tcp from any to any port 1194 -> $vpn port 1194 This is probably not giving you the results you desire. Basically because no from or to ip is specified ALL and I quite literally mean ALL packets using port 1194 are being sent to $vpn port 1194. Usually you want to make it something like, rdr on $ext_if inet proto udp from any to $ext_ip port 1194 -> $vpn port 1194 rdr on $int_if inet proto udp from any to $int_ip port 1194 -> $vpn port 1194 Now the traffic will be passed only when the packet is going to the host, not all traffic on a specific port. Another thing you may want to do is combined many of these rules you have. rdr on $ext_if inet proto { tcp, udp } to $ext_ip port 1194 -> $vpn port 1194 Also note the above, because we are specifying any for from, we can remove the form rule entirely and make it shorter. Hope this helps Ultima