Jump to content

Create Guest Network for Pineapple


Recommended Posts

I tried making a new ssid/network separate from the pineapple ssid. For guests only(to be used for nodogsplash). I can connect to it and get a dhcp address but no internet access. Normal setup ICS with laptop. Here's my network/dhcp/wireless files. Any help will be appreciated. Thanks.


config 'dnsmasq'
option 'domainneeded' '1'
option 'boguspriv' '1'
option 'filterwin2k' '0'
option 'localise_queries' '1'
option 'rebind_protection' '1'
option 'rebind_localhost' '1'
option 'local' '/lan/'
option 'domain' 'lan'
option 'expandhosts' '1'
option 'nonegcache' '0'
option 'authoritative' '1'
option 'readethers' '1'
option 'leasefile' '/tmp/dhcp.leases'
option 'resolvfile' '/tmp/resolv.conf.auto'

config 'dhcp' 'lan'
option 'interface' 'lan'
option 'start' '100'
option 'limit' '150'
option 'leasetime' '12h'
option 'ignore' '0'
list 'dhcp_option' '3,172.16.42.42'
list 'dhcp_option' '3,172.16.42.1'
list 'dhcp_option' '6,172.16.42.1,8.8.8.8'
list 'dhcp_option' '6,172.16.42.1,208.67.222.222'

#config 'dhcp' 'wan'
# option 'interface' 'wan'
# option 'ignore' '1'
# option 'start' '100'
# option 'limit' '150'
# option 'leasetime' '12h'
# list 'dhcp_option' '3,172.16.42.42'
# list 'dhcp_option' '6,172.16.42.1,8.8.8.8'
# list 'dhcp_option' '6,172.16.42.1,208.67.222.222'

#added below-----------------------------------------
config 'dhcp' 'guest'
option 'interface' 'guest'
option 'start' '100'
option 'limit' '150'
option 'leasetime' '12h'
list 'dhcp_option' '3,172.16.42.42'
list 'dhcp_option' '3,10.0.0.1'
list 'dhcp_option' '6,10.0.0.1,8.8.8.8'
list 'dhcp_option' '6,10.0.0.1,208.67.222.222'

# Copyright © 2006 OpenWrt.org

config interface loopback
option ifname lo
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0

config interface lan
option ifname eth0
option type bridge
option proto static
option ipaddr 172.16.42.1
option netmask 255.255.255.0
option gateway 172.16.42.42
option dns 8.8.8.8

config interface wan
option ifname eth1
option proto dhcp

config switch eth0
option enable_vlan 1

config switch_vlan
option device eth0
option vlan 1
option ports "0 1"

config interface usb
option ifname usb0
option proto dhcp

#added below----------------------------------

config 'interface' 'guest'


option type bridge
option 'proto' 'static'
option 'ipaddr' '10.0.0.1'
option 'netmask' '255.255.255.0'

config wifi-device radio0
option type mac80211
option channel 11
option hwmode 11ng
option macaddr 00:c0:ca:60:57:4e
option htmode HT20
list ht_capab SHORT-GI-20
list ht_capab SHORT-GI-40
list ht_capab RX-STBC1
list ht_capab DSSS_CCK-40
# REMOVE THIS LINE TO ENABLE WIFI:
# option disabled 1

config wifi-iface
option device radio0
option network lan
option mode ap
option ssid "pineapple 57:4e"
option encryption psk2
option 'key' '12345678q'

#--------------------------------------
config wifi-iface
option device radio0
option network guest
option mode ap
option ssid "Hotspot"
option encryption none

I used this how to guide here.

Edited by TylerCPU
Link to comment
Share on other sites

I am assuming you made a new subnet. You are going to need to add it to your routing tables (correct me if I am wrong).

Link to comment
Share on other sites

I am assuming you made a new subnet. You are going to need to add it to your routing tables (correct me if I am wrong).

I don't know if I created a new subnet. I didn't want to mess with that so I used a totally new IP address range 10.x.x.x.

I guess I did make a new subnet. I used 255.255.255.0 for the netmask instead of the normal 255.0.0.0.

I totally forgot about the routing tables, but I don't know what commands to use to point the 10.0.0.0 to the default gateway. I looked all over the web, but I couldn't come up with anything. I tried changing the gateway for 10.0.0.0 from * to 172.16.42.42, but it makes it for br-lan not br-guest. The new defined network in /etc/config/network. So here is my routing table.

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         172.16.42.42    0.0.0.0         UG    0      0        0 br-lan
10.0.0.0        *               255.255.255.0   U     0      0        0 br-guest
172.16.42.0     *               255.255.255.0   U     0      0        0 br-lan
root@Pineapple:~#


Ideally I would like the new wifi network "Hotspot" to be on a separate network with the traffic pointing to the default gateway. I want it to be compatible with my setup. Wi-Fi------- Laptop-------- Ethernet to pineapple------- Wi-Fi out. Normal ICS. I don't know much about networking. Any help will be greatly appreciated.

Link to comment
Share on other sites

Your problem is that the gateway is 172.16.42.42 which the 10.x network has no communication with. Any host on the 10.x network has no way to communicate with the 172.16.42 network. To add a gateway you will need to use the route command so go ahead and "man route". Also the configuration files are somewhere in /etc/config I believe. Best of luck!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...