Just installed OpenWRT 12.09 in my router, but became a little confused about interfaces/bridges/vlans.
After my first boot, I logged in and set my root password, so I used Luci to activate my Wi-Fi, and took me a little to figure out that I could bridge Wi-Fi with LAN to get access to the internet. But I ended up with two problems:
- The DHCP addresses are been provided by my ISP (which is bad since I have to pay an extra fee for each IP)
- I can't block SHH access from the Internet/WAN, so my router is a bit vulnerable.
How should I configure—preferably by Luci—to do the following:
- DHCP provided by this router to my Internal devices, with resolving of 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, doesn’t explain it, nor provide any clue.
Some notes: - I'm a Gentoo Linux user, so I consider myself a good learner, but haven't yet found any good references for OpenWRT. - My device is TP-Link TL-MR3020 by the way it has only one LAN/eth0 interface and one wirelss/radio0 one.
Update: Here are some of my config files to review; 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'