Hostapd serve todas as páginas da Web para o cliente Windows 7, não para XP ou Android

2

Eu instalei o hostapd e o dnsmasq em um laptop rodando o Linux Mint 15, como um relé sem fio: A entrada do roteador wi-fi remoto é através do wlan0, o cartão pcmcia wifi que serve as máquinas cliente é wlan1.

Esse arranjo funciona lindamente com minha máquina Win7 de 64 bits; Todos os sites carregam rapidamente e sem problemas, mesmo quando o streaming de vídeo. Minha caixa de Win7 dual-botas Win7 ou Linux Mint 14. Nenhum problema em qualquer sistema operacional.

No meu computador Windows Xp de 32 bits e no tablet Android, tenho dificuldade em carregar determinados sites. Entre eles, amazon.com e imdb.com, (nenhum dos quais é pingável a partir de qualquer máquina, acredito pelo design do site). Ocasionalmente, esses sites carregam o título da página no topo do broswer, (às vezes não), mas ainda tenho páginas em branco.

Startpage.com e google.com são duvidosos: Estranhamente, enquanto um pode carregar bem o outro não vai demorar muito, e parece não haver maneira de dizer qual dos dois vai carregar, embora um deles irá carregar muito bem. O mesmo é frequentemente verdade para o ubuntuforums.org e outros.

O problema existe no Firefox, Google Chrome e IE na caixa XP, todos os navegadores no Android. Distância da caixa hostapd não é um fator.

Todos os sites podem ser acessados se eu usar uma VPN remota (como vpnbook.com) em uma caixa de cliente (OpenVPN ou PPTP).

Eu tentei usar o DCHP direto (via dnsmasq) nas máquinas XP e Android, permitindo que eles recebessem suas configurações de rede estritamente do servidor hostapd. Nessas máquinas, também tentei adicionar servidores de nomes não-DCHP, incluindo google, endereços IP estáticos e / ou adicionando o gateway padrão (a caixa hostapd). Nenhuma alteração faz diferença.

Qualquer ajuda para resolver este problema será muito apreciada.

Minhas configurações seguem. * é usado para ocultar dados confidenciais

/ etc / network / interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

#Wifi Access Point Setup
auto wlan1

hostapd.conf

#hostapd.conf
# Define interface
interface=wlan1
# Select driver
driver=nl80211
# Set access point name
ssid=******
# Set access point harware mode to 802.11g
hw_mode=g
# Set WIFI channel (can be easily changed)
channel=11
# Enable WPA2 only (1 for WPA, 2 for WPA2, 3 for WPA + WPA2)
wpa=2
wpa_passphrase=************

dnsmasq.conf

#dnsmasq.conf
# Bind to only one interface
bind-interfaces
# Choose interface for binding
interface=wlan1
# Specify range of IP addresses for DHCP leasses
dhcp-range=192.168.*.*,192.168.*.*,12h
no-hosts
addn-hosts=/etc/hosts.dnsmasq
#INTERFACE_NET=wlan0
server=208.67.222.222
server=208.67.220.220

hosts.dnsmasq

#hosts.dnsmasq
192.168.*.*  ******

redes

# symbolic names for networks, see networks(5) for more information
link-local 169.254.0.0

nsswitch.conf

# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the 'glibc-doc-reference' and 'info' packages installed, try:
# 'info libc "Name Service Switch"' for information about this file.

passwd:         compat
group:          compat
shadow:         compat

#hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4
hosts:          files dns
networks:       files

protocols:      db files
services:       db files
ethers:         db files
rpc:            db files

netgroup:       nis

resolv.conf

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1

# OpenDNS Fallback (configured by Linux Mint in /etc/resolvconf/resolv.conf.d/tail).
nameserver 208.67.222.222
nameserver 208.67.220.220

sysctl.conf

#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3

##############################################################3
# Functions previously found in netbase
#

vm.swappiness = 10

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# See http://lwn.net/Articles/277146/
# Note: This may impact IPv6 TCP sessions too
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
#net.ipv6.conf.all.forwarding=1


###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#
#net.ipv6.conf.all.accept_ra = 0
#disable ipv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
# TCP stack tweaking for lossy wireless networks (Added as test: Not particularly lossy)
net.ipv4.tcp_frto = 1
net.ipv4.tcp_frto_response = 2
net.ipv4.tcp_low_latency = 1

rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

ifconfig wlan0 up
iwconfig wlan0 rate auto
iptables -t nat -A POSTROUTING -s 192.168.*.*/24 -o wlan0 -j MASQUERADE

# Line below starts hostapd on system start
/bin/sh /etc/APstart.sh

exit 0

iptables.rules

# Generated by iptables-save v1.4.12 on Sat Nov 30 16:08:41 2013
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A FORWARD -s 192.168.*.*/24 -o wlan0 -j ACCEPT
-A FORWARD -d 192.168.*.*/24 -i wlan0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
COMMIT
# Completed on Sat Nov 30 16:08:41 2013
# Generated by iptables-save v1.4.12 on Sat Nov 30 16:08:41 2013
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [2:333]
:POSTROUTING ACCEPT [2:333]
    -A POSTROUTING -s 192.168.*.*/24 -o wlan0 -j MASQUERADE
COMMIT
# Completed on Sat Nov 30 16:08:41 201

APstart.sh (script de início. É executado na inicialização do sistema ou manualmente)

#!/bin/bash
# Start
# Configure IP address for WLAN
sudo ifconfig wlan1 192.168.*.*
# Start DHCP/DNS server
sudo service dnsmasq restart
# Enable routing
sudo sysctl net.ipv4.ip_forward=1
# Enable NAT
# Run access point daemon
sudo hostapd /etc/hostapd.conf
# Stop
# Disable NAT
sudo iptables -D POSTROUTING -t nat -o wlan0 -j MASQUERADE
# Disable routing
sudo sysctl net.ipv4.ip_forward=0
# Disable DHCP/DNS server
sudo service dnsmasq stop
sudo service hostapd stop

Algum comando do terminal sai da caixa hostapd:

Saída: host amazon.com

amazon.com has address 205.251.242.54
amazon.com has address 72.21.194.212
amazon.com has address 72.21.215.232
amazon.com has address 176.32.98.166
amazon.com mail is handled by 5 amazon-smtp.amazon.com.

Saída: traceroute amazon.com (192.168.1.1 é o roteador wi-fi remoto via wlan0)

traceroute to amazon.com (72.21.194.212), 30 hops max, 60 byte packets
 1  192.168.1.1 (192.168.1.1)  4.137 ms  4.270 ms  6.582 ms
 2  192.168.0.1 (192.168.0.1)  22.555 ms  22.773 ms  22.995 ms
 3  blng-dsl-gw16.blng.qwest.net (67.42.227.16)  74.420 ms  74.481 ms  75.151 ms
 4  blng-agw1.inet.qwest.net (65.100.79.121)  39.057 ms  40.915 ms  43.690 ms
 5  dca2-edge-01.inet.qwest.net (67.14.28.110)  105.108 ms  106.398 ms  108.563 ms
 6  65.120.78.82 (65.120.78.82)  107.699 ms  87.128 ms  91.314 ms
 7  72.21.220.121 (72.21.220.121)  91.507 ms  91.612 ms 72.21.220.153 (72.21.220.153)  91.723 ms
 8  72.21.222.139 (72.21.222.139)  92.965 ms  94.833 ms  96.127 ms
 9  * * *
10  * * *
11  * * *
12  * * *
13  * * 205.251.248.11 (205.251.248.11)  95.998 ms
14  * * *
15  * * *
16  * * *
17  * * *
18  * * *
19  * * *
20  * * *
21  * * *
22  * * *
23  * * *
24  * * *
25  * * *
26  * * *
27  * * *
28  * * *
29  * * *
30  * * *

Saída: host imdb.com

imdb.com has address 72.21.202.149
imdb.com has address 72.21.210.29
imdb.com has address 72.21.206.80
imdb.com mail is handled by 10 smtp-fw-31001.amazon.com.
imdb.com mail is handled by 10 smtp-fw-33001.amazon.com.
imdb.com mail is handled by 10 smtp-fw-4101.amazon.com.
imdb.com mail is handled by 10 smtp-fw-2101.amazon.com.
imdb.com mail is handled by 10 smtp-fw-9101.amazon.com.

Saída: host google.com

google.com has address 74.125.225.174
google.com has address 74.125.225.165
google.com has address 74.125.225.162
google.com has address 74.125.225.168
google.com has address 74.125.225.163
google.com has address 74.125.225.161
google.com has address 74.125.225.169
google.com has address 74.125.225.167
google.com has address 74.125.225.166
google.com has address 74.125.225.160
google.com has address 74.125.225.164
google.com has IPv6 address 2607:f8b0:400f:800::1002
google.com mail is handled by 20 alt1.aspmx.l.google.com.
google.com mail is handled by 30 alt2.aspmx.l.google.com.
google.com mail is handled by 50 alt4.aspmx.l.google.com.
google.com mail is handled by 10 aspmx.l.google.com.
google.com mail is handled by 40 alt3.aspmx.l.google.com.

Saída: host startpage.com

startpage.com has address 69.90.210.119
startpage.com mail is handled by 10 mail.startpage.com.
    
por Alan 16.12.2013 / 00:55

0 respostas