From owner-freebsd-questions@freebsd.org Thu Mar 16 00:38:24 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 CD006D0C081 for ; Thu, 16 Mar 2017 00:38:24 +0000 (UTC) (envelope-from ppauly@gmail.com) Received: from mail-yw0-x22b.google.com (mail-yw0-x22b.google.com [IPv6:2607:f8b0:4002:c05::22b]) (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 8962010DF for ; Thu, 16 Mar 2017 00:38:24 +0000 (UTC) (envelope-from ppauly@gmail.com) Received: by mail-yw0-x22b.google.com with SMTP id v198so21861412ywc.2 for ; Wed, 15 Mar 2017 17:38:24 -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=X0EBmfHAsi7IZX0G3y8eDaPYbbeKfexGQOnuTj8Uwls=; b=NWe0WqHyZmoVcvHUpt8X55EaEP5X68S5KOQkNViY8B2OCNOY4YbSBATduhhDJ7UDMQ 7vf9al5m2JM1bwsKoqm0nXJ2+YFrBI1rxWZya9YuWF3ExHABnN16/URiRCXfrrE0F7QZ Mn38Q/7OT+sS0i4Y/GGmWkPLQfmb24J5d/gfQkHnt+0LjjjfASS4CeOu3SIIb7Svvah/ cw6bWeQlNW4RsVl/oKkPz0QyPNeXC6GG9FeRLm1pHOjkRSsVGyqQVmkIlwp5x+a1sp6+ ay9zU+9RLsx6f7TPbPu8g0X2OXijikGrV9O2+egKz6GpP4uf7GoP3NXNJWnOJCL4uwrK cFQg== 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=X0EBmfHAsi7IZX0G3y8eDaPYbbeKfexGQOnuTj8Uwls=; b=X2virEVPYb4H35XAt3dlp46iHZVA5Bb+onljtOsP/eRZNRUoEzPfthbwyJNurrhIGI alZS7V14ZL3t8NbAnCBpv+fcJ/GP4z1TX6r0k+t7o9L6lhCHQpGIa6JNqkuFLDhSB15i 9e7KczJAgk2YDXcMJEt0ddVGiuWT1cbKVTqgQpezcRBiiJEZxMSsOaE9zTWbxNwbuweQ 7OKPdFyO+hvvKiPNQszMjrTQxdt2G/5rKOYMXm56Ip8JBCDvDGQ20eXhaBEuLfabvIg4 AtkaFvdVzf9xJoM/0BWqA/9zy0vu82C0BdgGo8ylC2if7XjTuM3t5aSlro/NjolSKWZJ aRgg== X-Gm-Message-State: AFeK/H0Ig3rYAHBCFystevdZr28qaCt/NmfHVg6k7EWw7ayUeob95ntin4Z+IpZtCzMz2qH9cIeYIv1/8wEelw== X-Received: by 10.13.207.68 with SMTP id r65mr4527142ywd.329.1489624703801; Wed, 15 Mar 2017 17:38:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.217.85 with HTTP; Wed, 15 Mar 2017 17:38:23 -0700 (PDT) In-Reply-To: References: <58C08444.8060600@gmail.com> <58C17FEB.1020905@FreeBSD.org> <58C96961.9010804@gmail.com> <58C9D9E8.5060604@gmail.com> From: Peter Pauly Date: Wed, 15 Mar 2017 20:38:23 -0400 Message-ID: Subject: Re: WIFI as access point To: Ernie Luzar Cc: freebsd-questions@freebsd.org 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: Thu, 16 Mar 2017 00:38:24 -0000 Do you need: sysctl net.inet.ip.forwarding=1 On Wed, Mar 15, 2017 at 8:36 PM, Peter Pauly wrote: > Nevermind - I see the: gateway_enable="YES" > > On Wed, Mar 15, 2017 at 8:31 PM, Peter Pauly wrote: > >> How are you routing packets between the two interfaces? >> >> On Wed, Mar 15, 2017 at 8:18 PM, Ernie Luzar wrote: >> >>> On Wed, Mar 15, 2017 at 12:18 PM, Ernie Luzar >>> > wrote: >>>> >>>> Dima Panov wrote: >>>> >>>> >>>> Ernie Luzar wrote: >>>> >>>> Hello List; >>>> >>>> I have this wifi card >>>> http://www.dlink.com/al/sq/pro >>>> ducts/dwa-556-xtreme-n-pci-express-desktop-adapter >>>> >>> oducts/dwa-556-xtreme-n-pci-express-desktop-adapter> >>>> >>>> >>>> I recovered it from a decommissioned win7 box. On win7 this >>>> wifi card >>>> could only be used to connect to a router access point. >>>> >>>> If I add this wifi card to my FreeBSD 11.0 system can it be >>>> configured >>>> to function as an access point? >>>> >>>> >>>> This card is fully support by ath driver as "AR5418 Wireless >>>> Network >>>> Adapter". >>>> Copmlete examples with various AP setup described in manual page >>>> for driver. >>>> >>>> >>>> >>>> I have followed the handbook "30.3.6 Freebsd Host Access Points" >>>> Chapter in setting up this ath0 wifi card that is installed into my >>>> gateway box that has a LAN on it. A win7 laptop can see the ssid and >>>> connect to it. But it can not gain public internet access. Win7 wifi >>>> trouble shooting says no valid ip address and not end point. To me >>>> this sounds like a network configuration problem on my Freebsd >>>> gateway box. >>>> >>>> /root >ifconfig wlan0 >>>> wlan0: flags=8843 metric 0 >>>> mtu 0 >>>> ether 00:18:e7:d5:b3:84 >>>> inet 10.0.10.100 netmask 0xffffff00 broadcast 10.0.10.255 >>>> nd6 options=29 >>>> media: IEEE 802.11 Wireless Ethernet autoselect mode 11ng >>>> >>>> status: running >>>> ssid FBSD_AP channel 1 (2412 MHz 11g ht/40+) bssid >>>> 00:18:e7:d5:b3:84 >>>> regdomain FCC indoor ecm authmode WPA2/802.11i privacy MIXED >>>> deftxkey 3 AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 27 >>>> scanvalid 60 >>>> protmode CTS ampdulimit 64k ampdudensity 8 shortgi wme burst >>>> dtimperiod 1 -dfs >>>> groups: wlan >>>> >>>> >>>> >>>> /root >cat /etc/hostapd.conf >>>> interface=wlan0 >>>> debug=2 >>>> ctrl_interface=/var/run/hostapd >>>> ctrl_interface_group=wheel >>>> ssid=FBSD_AP >>>> wpa=2 >>>> wpa_passphrase=test >>>> wpa_key_mgmt=WPA-PSK >>>> wpa_pairwise=CCMP >>>> >>>> >>>> /root >cat /etc/rc.conf >>>> Snip >>>> >>>> gateway_enable="YES" >>>> >>>> ifconfig_em0="DHCP" # from cable modem >>>> ifconfig_vge0="inet 10.0.10.2" # to LAN switch >>>> >>>> # Wifi in hostap mode >>>> wlans_ath0="wlan0" >>>> create_args_wlan0="wlanmode hostap" >>>> ifconfig_wlan0="inet 10.0.10.100 netmask 255.255.255.0 ssid FBSD_AP >>>> mode 11g" >>>> hostapd_enable="YES" >>>> >>>> dhcpd_enable="YES" >>>> dhcpd_conf="/usr/local/etc/dhcpd.conf" >>>> dhcpd_ifaces="vge0" # ASRock Server Lan Nic >>>> dhcpd_flags="-q" >>>> >>>> >>>> This general config has been working for many years, since release >>>> 3.0 of Freebsd. The only thing new is the wifi card being used as a >>>> gateway hostap. >>>> >>>> I do not understand what this is doing >>>> fconfig_wlan0="inet 10.0.10.100 netmask 255.255.255.0 >>>> >>>> I can not find any documentation on this as to it's purpose. >>>> >>>> I am trying to duplucate my cisco wifi router config which has this >>>> security mode = wpa2 personal >>>> encrytion = tkip or aes >>>> network mode = BGN >>>> >>>> >>>> Thanks for any help you can give me >>>> >>>> >>>> Peter Pauly wrote: >>>> You're serving DHCP on your LAN interface, but not on the WiFi >>>> interface. >>>> >>>> >>> Thanks I corrected that now. >>> >>> Now the win7 wifi stays connected but has no internet access. >>> >>> /root >ifconfig wlan0 list scan >>> ADDR AID CHAN RATE RSSI IDLE TXSEQ RXSEQ CAPS FLAG >>> 0c:ee:e6:ba:6f:26 1 1 54M 26.5 135 16 8288 EPS AQE RSN WME >>> >>> I also see a dhcp lease for the ip address that win7 wifi says it has. >>> >>> What can be the cause of no internet access on the wifi hostap? >>> >>> >>> >>> >>> >> >