Just installed OpenWRT 12.09 in my router, but became a little confusing about interfaces/bridges/vlans, please help me to understand!
After my first boot, I logged in and setted my root password, so I used Luci to activate my wifi, and took me a little to figure out that I could bridge wifi with lan to get access to the internet. But I ended up with two problems:
- The DHCP adresses are been provided by my ISP (which is bad since I have to pay an extra tax for each IP)
- I cant block ssh tries from the internet, so my router is a bit vulnerable.
How should I configure (preferably by Luci, since I do not have the time to learn a lot now) to get:
- DHCP provided by this router to my internal devices, with resolving of device names (DNS)
- My external address (lan/eth0) provided by the ISP modem (so I can't simple block port 68 in this interface)
- Properly configure my interfaces so I can allow ssh only on internal (wan/radio0) interface
Which and why I should choose to use bridge or VLAN? This article, do not explain it, nor provide any glue.
Some notes: - I'm a gentoo user, so I consider myself a good learner, but haven't yet found any good references to OpenWRT - My device is TP-Link TL-MR3020 by the way it have only one lan/eth0 iface and one wireles/radio0 one.
Update: here are some of my config files tl;dr
This is my '/etc/config/dhcp' file
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 leasetime '12h' option limit '15' config dhcp 'wan' option interface 'wan' option ignore '1'
This is my '/etc/config/dropbear' file
config dropbear option PasswordAuth 'on' option RootPasswordAuth 'off' option Port '22' # option BannerFile '/etc/banner'
This is my '/etc/config/network' file
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 gateway '192.168.100.1' option dns '192.168.100.1' option ipaddr '192.168.100.2' option netmask '255.255.255.0'
This is my /etc/config/wireless file
config wifi-device 'radio0' option type 'mac80211' option macaddr '64:66:b3:4d:8b:ce' option hwmode '11ng' 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' option txpower '27' option country 'US' option channel 'auto' config wifi-iface option device 'radio0' option network 'lan' option mode 'ap' option ssid 'EDITED' option encryption 'psk-mixed' option key 'EDITED'