LinuxForum.Fans
Тема

Wi-fi + lubuntu + android

Автор: roulis2844sasha 3 сообщений 1286 просмотров
#175111

неудается создать точку доступа, нужна помошь

/etc/hostapd/hostapd.conf

Показать
interface=wlan0
driver=nl80211

#Ваше названи точки доступа
ssid=MySuperAP
country_code=RU
hw_mode=g
channel=1

macaddr_acl=0

wpa=3
wpa_key_mgmt=WPA-PSK
#Ваш пароль
wpa_passphrase=MySuperPass123
wpa_pairwise=TKIP CCMP

/etc/default/hostapd

Показать
# Defaults for hostapd initscript
#
# See /usr/share/doc/hostapd/README.Debian for information about alternative
# methods of managing hostapd.
#
# Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration
# file and hostapd will be started during system boot. An example configuration
# file can be found at /usr/share/doc/hostapd/examples/hostapd.conf.gz
#
RUN_DAEMON="yes"
DAEMON_CONF="/etc/hostapd/hostapd.conf"

# Additional daemon options to be appended to hostapd command:-
# -d show more debug messages (-dd for even more)
# -K include key data in debug messages
# -t include timestamps in some debug messages
#
# Note that -B (daemon mode) and -P (pidfile) options are automatically
# configured by the init.d script and must not be added to DAEMON_OPTS.
#
#DAEMON_OPTS=""

/etc/network/interfaces

Показать
auto lo
iface lo inet loopback

iface wlan0 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.1
pre-up iptables-restore /etc/iptables.rules

auto dsl-provider
iface dsl-provider inet ppp
pre-up /sbin/ifconfig eth0 up # line maintained by pppoeconf
provider dsl-provider

auto eth0
iface eth0 inet manual

/etc/iptables.rules

Показать
# Generated by iptables-save
*nat
:PREROUTING ACCEPT [4430:389020]
:POSTROUTING ACCEPT [24:2723]
:OUTPUT ACCEPT [28:3602]
-A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE
COMMIT

/etc/dhcp3/dhcpd.conf

Показать
ddns-update-style none;
option domain-name "MySuperNet";
option domain-name-servers IPS_OF_DNS_SERVERS;
default-lease-time 42300;
max-lease-time 84600;
log-facility local7;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option routers 192.168.0.1;
}

/etc/default/dhcp3-server

Показать
INTERFACES="wlan0"

ifconfig

Показать
eth0 Link encap:Ethernet HWaddr 00:25:22:37:eb:ee
inet6 addr: fe80::225:22ff:fe37:ebee/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:149572 errors:0 dropped:0 overruns:0 frame:0
TX packets:116421 errors:0 dropped:0 overruns:0 carrier:1
collisions:0 txqueuelen:1000
RX bytes:137920623 (137.9 MB) TX bytes:11599485 (11.5 MB)
Interrupt:44

lo Link encap:Локальная петля (Loopback)
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1380 (1.3 KB) TX bytes:1380 (1.3 KB)

ppp0 Link encap:Протокол PPP (Point-to-Point Protocol)
inet addr:178.90.160.5 P-t-P:212.154.239.254 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:148830 errors:0 dropped:0 overruns:0 frame:0
TX packets:115689 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:134459518 (134.4 MB) TX bytes:8992245 (8.9 MB)

wlan0 Link encap:Ethernet HWaddr d8:5d:4c:98:f8:66
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
#176228

прошлое сообщение вышло случайно)
если же просто сеть, то что-то вроде такого надо сделать: iwconfig wlan0 mode ad-hoc essid "your_ssid"

на счёт инета:
в андройде указать dns_server, взять его нужно в убунте в файле /etc/resolv.conf
там строки вида:
nameserver IP


кинте настройки с андройда...
и вообше какие ошибки...

#176272

и желательно настроить раздачу адресов по dhcp. у меня ни в какую не хотел ведроид с роутером конектится по статическому адресу...

Войдите или зарегистрируйтесь, чтобы ответить.