Files in working configuration (before steps 8/9):
network:
Code: Select all
#### VLAN configuration
config switch eth0
option vlan0 "1 2 3 4 5*"
option vlan1 "0 5"
#### Loopback configuration
config interface loopback
option ifname "lo"
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
#### LAN configuration
config interface lan
option type bridge
option ifname "eth0.0"
option proto dhcp
#option ipaddr 192.168.1.1
#option netmask 255.255.255.0
#### WAN configuration
config interface wan
option ifname "eth0.1"
option proto dhcp
wireless:
Code: Select all
config wifi-device wl0
option type broadcom
option channel 6 # channel of wireless network
# REMOVE THIS LINE TO ENABLE WIFI:
# option disabled 1
config wifi-iface
option device wl0
option network lan
option mode sta # configures router to connect to network
option ssid MyNetwork # SSID of network
option encryption psk2
option key MyPass
firewall:
Code: Select all
config defaults
option syn_flood 1
option input ACCEPT
option output ACCEPT
option forward REJECT
config zone
option name lan
option input ACCEPT
option output ACCEPT
option forward REJECT
config zone
option name wan
option input ACCEPT
option output ACCEPT
option forward REJECT
option masq 1
config forwarding
option src lan
option dest wan
root@OpenWrt:~# ping
http://www.mightyohm.com
PING
http://www.mightyohm.com (75.125.121.238): 56 data bytes
64 bytes from 75.125.121.238: seq=0 ttl=48 time=64.050 ms
64 bytes from 75.125.121.238: seq=1 ttl=48 time=46.390 ms
64 bytes from 75.125.121.238: seq=2 ttl=48 time=69.734 ms
64 bytes from 75.125.121.238: seq=3 ttl=48 time=52.942 ms
Not working config (only changes are "LAN configuration" and wireless lan to wan, Steps 8/9)
network
Code: Select all
#### VLAN configuration
config switch eth0
option vlan0 "1 2 3 4 5*"
option vlan1 "0 5"
#### Loopback configuration
config interface loopback
option ifname "lo"
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0
#### LAN configuration
config interface lan
#option type bridge
option ifname "eth0.0"
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0
#### WAN configuration
config interface wan
option ifname "eth0.1"
option proto dhcp
wireless
Code: Select all
config wifi-device wl0
option type broadcom
option channel 6 # channel of wireless network
# REMOVE THIS LINE TO ENABLE WIFI:
# option disabled 1
config wifi-iface
option device wl0
option network wan
option mode sta # configures router to connect to network
option ssid MyNetwork # SSID of network
option encryption psk2
option key MyPass
No changes to firewall.
As of this documenting/testing/, home network is on 192.168.1.xxx
root@OpenWrt:~# ping
http://www.mightyohm.com
ping: bad address '
www.mightyohm.com'
Do I need to change the 'config forwarding' in firewall? Note that in this configuration I am able to Telnet to the router with a direct RJ45 cable from my latop to the router, as well as via the serial interface (FTDI cable).
Any ideas on why the last config does not work is appreciated.