I just can't get it to work properly. I can connect to my raspberry pi 3 and I do get an ip address, but I do not get any internet access. Here is my setup:
/etc/dhcpcd.conf:
Code: Select all
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.
# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel
# Inform the DHCP server of our hostname for DDNS.
hostname
# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
#duid
# Persist interface configuration when dhcpcd exits.
persistent
# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit
# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.
# Some interface drivers reset when changing the MTU so disabled by default.
#option interface_mtu
# A ServerID is required by RFC2131.
require dhcp_server_identifier
# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private
# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname
interface wlan0
static ip_address=10.0.0.6/24Code: Select all
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet manual
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
allow-hotplug wlan1
iface wlan1 inet manual
# wpa-conf /etc/wpa_supplicant/wpa_supplicant.confCode: Select all
# This is the name of the WiFi interface we configured above
interface=wlan0
# Use the nl80211 driver with the brcmfmac driver
driver=nl80211
# This is the name of the network
ssid=Pi3-AP
# Use the 2.4GHz band
hw_mode=g
# Use channel 1
channel=1
# Accept all MAC addresses
macaddr_acl=0
# Use WPA authentication
auth_algs=1
# Require clients to know the network name
ignore_broadcast_ssid=0
# Use WPA2
wpa=2
# Use a pre-shared key
wpa_key_mgmt=WPA-PSK
# The network passphrase
wpa_passphrase=raspberry
# Use AES, instead of TKIP
rsn_pairwise=CCMP
Code: Select all
interface=wlan0 # Use interface wlan0
bind-interfaces # Bind to the interface to make sure we aren't sending things elsewhere
server=8.8.8.8 # Forward DNS requests to Google DNS
domain-needed # Don't forward short names
bogus-priv # Never forward addresses in the non-routed address spaces.
dhcp-range=10.0.0.50,10.0.0.150,12h # Assign IP addresses between 172.24.1.50 and 172.24.1.150 with a 12 hour lease time/etc/iptables.ipv4.nat:
Code: Select all
# Generated by iptables-save v1.4.21 on Sat Apr 2 00:53:33 2016
*filter
:INPUT ACCEPT [25:4008]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [6:632]
-A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i wlan0 -o eth0 -j ACCEPT
COMMIT
# Completed on Sat Apr 2 00:53:33 2016
# Generated by iptables-save v1.4.21 on Sat Apr 2 00:53:33 2016
*nat
:PREROUTING ACCEPT [10:2086]
:INPUT ACCEPT [10:2086]
:OUTPUT ACCEPT [3:312]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
# Completed on Sat Apr 2 00:53:33 2016Output of `ifconfig -a` on my computer connected to Pi3-AP:
Code: Select all
enp0s25: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether 54:ee:75:54:df:e1 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 20 memory 0xf2500000-f2520000
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 10847 bytes 765133 (747.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10847 bytes 765133 (747.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.103 netmask 255.255.255.0 broadcast 10.0.0.255
inet6 fe80::124a:7dff:fe28:2620 prefixlen 64 scopeid 0x20<link>
ether 10:4a:7d:28:26:20 txqueuelen 1000 (Ethernet)
RX packets 2967749 bytes 3712998994 (3.4 GiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 938223 bytes 219054849 (208.9 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Code: Select all
[user@computer ~]$ ping 10.0.0.6
PING 10.0.0.6 (10.0.0.6) 56(84) bytes of data.
^C
--- 10.0.0.6 ping statistics ---
9 packets transmitted, 0 received, 100% packet loss, time 8007ms