Finished: CALL FOR TESTERS Ralink wireless run(4) usb driver for FreeBSD

Re: Finished: CALL FOR TESTERS Ralink wireless run(4) usb dr

This is my configuration:
/etc/rc.conf
Code:
ifconfig_em0="inet 192.168.0.1 netmask 255.255.255.0"

wlans_run0=wlan0
create_args_wlan0="wlanmode hostap"
ifconfig_wlan0="inet 192.168.2.1 netmask 255.255.255.0 ssid mik mode 11g channel 11"

gateway_enable="YES"
hostapd_enable="YES"

/etc/pf.conf
Code:
ext_if="em0"
int_if="wlan0"

set block-policy return
set skip on lo

# nat
nat on $ext_if from !($ext_if) -> ($ext_if:0)
pass keep state

/usr/local/etc/dhcpd.conf
Code:
option domain-name "example.org";
# opendns
option domain-name-servers 208.67.222.222, 208.67.220.220;

default-lease-time 600;
max-lease-time 7200;

log-facility local7;

subnet 192.168.2.0 netmask 255.255.255.0 {
        range 192.168.2.10 192.168.2.100;
        option routers 192.168.2.1;
}

/etc/hostapd.conf
Code:
interface=wlan0
debug=1
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=mik
wpa=1
wpa_passphrase=passphrase
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP TKIP
 
Re: Finished: CALL FOR TESTERS Ralink wireless run(4) usb dr

I disabled named (BIND), set everything as closely as possible to what you have and have tried several combinations of NAT in pf, and nothing has changed at all. I can connect to the AP but the phone does not connect through the machine.
 
Re: Finished: CALL FOR TESTERS Ralink wireless run(4) usb dr

Have you tried to use tcpdump or wireshark on your re0 interface to see where the connection fail?
 
Re: Finished: CALL FOR TESTERS Ralink wireless run(4) usb dr

I will give it a shot later this evening (maybe 16 hours from now). Do you have any suggested method(s)?
 
Re: Finished: CALL FOR TESTERS Ralink wireless run(4) usb dr

bryon said:
I will give it a shot later this evening (maybe 16 hours from now). Do you have any suggested method(s)?
Just run tcpdump -i re0 -w re0.pcap or wireshark on your AP, try to load a web page on your phone and stop capturing the traffic. You can send me your re0.pcap in private if you have a roblem to understand it.
 
Re: Finished: CALL FOR TESTERS Ralink wireless run(4) usb dr

tcpdump -i re0 -w re0.pcap
Code:
2014-06-11 19:14:44.075105 IP 96-35-30-17.dhcp.stls.mo.charter.com.57949 > vip01olvemo.stls.mo.charter.com.domain: 32869+ A? duckduckgo.com. (32)
2014-06-11 19:14:44.087984 IP vip01olvemo.stls.mo.charter.com.domain > 96-35-30-17.dhcp.stls.mo.charter.com.57949: 32869 2/0/0 A 50.18.192.251, A 50.18.192.250 (64)

So DNS requests appear to be processed on re0 but there is no follow up or fetch attempt sent by wlan0 for A 50.18.192.251, A 50.18.192.250

/usr/local/etc/dhcpd.conf
Code:
#ddns-update-style none;
#always-broadcast on;
default-lease-time 7200;
max-lease-time 7200;
#authoritative;
option domain-name-servers 24.217.0.5, 24.178.162.3;
#option domain-name-servers 192.168.1.1;
option domain-name "nsabsd";
#option netbios-name-servers 24.217.0.5, 24.178.162.3;

### WIRELESS NETWORK
###
subnet 192.168.1.0 netmask 255.255.255.0 {
        # NOTE: See: wired->range.notes
        range 192.168.1.10 192.168.1.100;
#        option broadcast-address 192.168.1.255;
#        option subnet-mask 255.255.255.0;
        option routers 192.168.1.1;
}

Could I be missing something in /etc/rc.conf? Possibly a static route or should I enable named?
 
Re: Finished: CALL FOR TESTERS Ralink wireless run(4) usb dr

Got it! What was messing me up was that the phone translates option domain-name to DNS suffix and, if the given domain-name matches any /etc/hosts declaration, dhcpd then becomes confused and warns that wlan0 is not available. So unless you have a dedicated dns server leave the domain-name option commented! Also, note that subnet-mask, broadcast-address, domain-name-servers and netbios-name-servers can all be declared in individual subnet statements; these carry over from ifconfig_wlan0 declarations and /etc/hostap.conf statements respectively.

Code:
ddns-update-style none;
always-broadcast on;
default-lease-time 7200;
max-lease-time 86400;
authoritative;
#option domain-name "nsabsd";
#option subnet-mask 255.255.255.0;
#option broadcast-address 192.168.1.255;
#option routers 192.168.1.1;
option domain-name-servers 24.217.0.5, 24.178.162.3;
#option domain-name-servers 192.168.1.12;
#option domain-name "nsabsd";
#option netbios-name-servers 192.168.1.1;
log-facility local7;

### WIRELESS NETWORK
###
subnet 192.168.1.0 netmask 255.255.255.0 {
        # NOTE: See: wired->range.notes
        range 192.168.1.10 192.168.1.100;
#        option broadcast-address 192.168.1.255;
#        option subnet-mask 255.255.255.0;
        option routers 192.168.1.1;
}

Thank you @acheron! The tcpdump tip came in handy!

For those in a similar situation to what I was in use the following commands as you are exhausting combinations of settings:

#tcpdump -i re0 -w re0.pcap (to capture tcp transactions on external nic to your current work directory)
#tcpdump -tttt -r /usr/home/bryon/re0.pcap (to read those transactions inside of a terminal)
#rm /usr/home/bryon/re0.pcap (to get rid of the previously saved tcp dump before trying again)
 
Last edited by a moderator:
Back
Top