Jump to content

orange pi pc+ as an Access point -


sash99

Recommended Posts

Hi there i was trying to set up orange pi pc + as a  wifi acces point server. i got most every thing to work fine  i can talk to all the intenal ip remotely just can not talk to internet from wifi side,   from the  board (eth0) itself no problem..

 my configutation is installed -- hostapd and dsnmasq

 /etc/network/interface

# Local loopback
auto lo eth0 wlan0
iface lo inet loopback

# Wired adapter #1
allow-hotplug eth0
#no-auto-down eth0
iface eth0 inet dhcp
#	hwaddress ether # if you want to set MAC manually
#	pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838

# Wired adapter #2
#allow-hotplug eth1
#iface eth1 inet dhcp
#	hwaddress ether # if you want to set MAC manually
#	pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838

# Wireless adapter #1
iface wlan0 inet static
hostapd /etc/hostapd.conf
	address 192.168.50.1
	netmask 255.255.255.0
	broadcast 255.255.255.255
	network 192.168.50.0

#	wpa-ssid SSID
#	wpa-psk xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# to generate proper encrypted key: wpa_passphrase yourSSID yourpassword

my /etc/hostapd.conf

interface=wlan0

ssid=IOT
channel=1

my /etc/networkmanager/networkmanager.conf

[main]
dns=dnsmasq
plugins=ifupdown,keyfile

[ifupdown]
managed=true
[keyfile]
unmanaged-devices=interface-name:p2p0
unmanaged-devices=interface-name:wlan0

my /etc/dnsmasq.conf ( added these lines)

interface=lo,wlan0
no-dhcp-interface=lo
dhcp-range=192.168.50.20,192.168.50.254,255.255.255.0,12h

my /etc/sysctl.conf (added this lines )

net.ipv4.ip_forward=1

my /etc/rc.local ( added this line)

iptables -t nat -A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24  -j MASQUERADE

  I can ping and or bring up  webpages from my wan (eth0) from wifi (wlan0)  and vise versa   I can ping 8.8.8.8 ( google dns ) from the wan ( eth0)  but not from wifi (wlan0). dhcp assigns nicely at boot  all that seams fine there . I even tried  using google dns ( as the primary dns severer on the wifi connection  ) still no luck geting to the outside world..    wondering if anyone see the problem or what I might be missing .. it is probably something simple, that  I am just missing it ... as it most likely has to do with NAT and iptables  i just do not know what as it is serving  webages to eth0 and wlan0  it just not routing wlan0 to the internet

 

thank you for your time

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines