hotspot
Posté : ven. 16 juin 2017 19:35
j'ai fais quelques essais sur un rpi2 , une clé wifi ...
rien a faire ...
voici mes principaux fichiers .
Pour l'instant j'en suis juste a faire un hotspot ethernet -> wifi !
Si quelqu'un pouvait voir car un œil neuf trouve un truc sur lequel je suis passé 10 fois !
merci !
/etc/hostapd/hostapd.conf
interface=wlan0
ssid=Marco
channel=1
# WPA and WPA2 configuration
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=MOT de PASSE
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
# Hardware configuration
driver=nl80211
hw_mode=g
/etc/default/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.conf"
/etc/dhcp/dhcpd.conf
ddns-update-style none;
default-lease-time 86400;
max-lease-time 86400;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.2 192.168.1.9 ;
option domain-name-servers 8.8.8.8, 8.8.4.4 ;
option domain-name "home";
option routers 192.168.1.1 ;
}
/etc/default/isc-dhcp-server
DHCPD_CONF="/etc/dhcp/dhcpd.conf"
INTERFACES="wlan0"
/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.10.1
netmask 255.255.255.0
up iptables-restore < /etc/iptables.ipv4.nat
/etc/sysctl.conf
net.ipv4.ip_forward=1
/etc/iptables.ipv4.nat
# Generated by iptables-save v1.4.21 on Fri Jun 16 12:34:29 2017
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Fri Jun 16 12:34:29 2017
# Generated by iptables-save v1.4.21 on Fri Jun 16 12:34:29 2017
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i wlan0 -o eth0 -j ACCEPT
COMMIT
# Completed on Fri Jun 16 12:34:29 2017
###################################################
pi@minibian:~$ sudo iwconfig
eth0 no wireless extensions.
wlan0 unassociated Nickname:"rtl_wifi"
Mode:Auto Access Point: Not-Associated Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
lo no wireless extensions.
pi@minibian:~$ sudo ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:4a:07:d7
inet addr:192.168.1.135 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:fe4a:7d7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3405 errors:1428 dropped:741 overruns:0 frame:1428
TX packets:1783 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:311096 (303.8 KiB) TX bytes:327138 (319.4 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:104 (104.0 B) TX bytes:104 (104.0 B)
wlan0 Link encap:Ethernet HWaddr 28:10:7b:bd:e0:29
inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0
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)
rien a faire ...
voici mes principaux fichiers .
Pour l'instant j'en suis juste a faire un hotspot ethernet -> wifi !
Si quelqu'un pouvait voir car un œil neuf trouve un truc sur lequel je suis passé 10 fois !
merci !
/etc/hostapd/hostapd.conf
interface=wlan0
ssid=Marco
channel=1
# WPA and WPA2 configuration
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=MOT de PASSE
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
# Hardware configuration
driver=nl80211
hw_mode=g
/etc/default/hostapd
DAEMON_CONF="/etc/hostapd/hostapd.conf"
/etc/dhcp/dhcpd.conf
ddns-update-style none;
default-lease-time 86400;
max-lease-time 86400;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.2 192.168.1.9 ;
option domain-name-servers 8.8.8.8, 8.8.4.4 ;
option domain-name "home";
option routers 192.168.1.1 ;
}
/etc/default/isc-dhcp-server
DHCPD_CONF="/etc/dhcp/dhcpd.conf"
INTERFACES="wlan0"
/etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.10.1
netmask 255.255.255.0
up iptables-restore < /etc/iptables.ipv4.nat
/etc/sysctl.conf
net.ipv4.ip_forward=1
/etc/iptables.ipv4.nat
# Generated by iptables-save v1.4.21 on Fri Jun 16 12:34:29 2017
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Fri Jun 16 12:34:29 2017
# Generated by iptables-save v1.4.21 on Fri Jun 16 12:34:29 2017
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i wlan0 -o eth0 -j ACCEPT
COMMIT
# Completed on Fri Jun 16 12:34:29 2017
###################################################
pi@minibian:~$ sudo iwconfig
eth0 no wireless extensions.
wlan0 unassociated Nickname:"rtl_wifi"
Mode:Auto Access Point: Not-Associated Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
lo no wireless extensions.
pi@minibian:~$ sudo ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:4a:07:d7
inet addr:192.168.1.135 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::ba27:ebff:fe4a:7d7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3405 errors:1428 dropped:741 overruns:0 frame:1428
TX packets:1783 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:311096 (303.8 KiB) TX bytes:327138 (319.4 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:104 (104.0 B) TX bytes:104 (104.0 B)
wlan0 Link encap:Ethernet HWaddr 28:10:7b:bd:e0:29
inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0
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)