Difference between revisions of "Openwrt"
(→mwan3) |
(→mwan3) |
||
Line 65: | Line 65: | ||
/etc/config/mwan3 | /etc/config/mwan3 | ||
/etc/config/firewall | /etc/config/firewall | ||
+ | |||
+ | [[Mwan3_On_Openwrt]] | ||
If you add a new WAN interface, (e.g. wanb or wan2) you must add wanb to the existing wan firewall zone for outgoing comms. How this is handled differs from 17 to 19.*2 | If you add a new WAN interface, (e.g. wanb or wan2) you must add wanb to the existing wan firewall zone for outgoing comms. How this is handled differs from 17 to 19.*2 | ||
Line 72: | Line 74: | ||
<small>* the current mwan3 page is a lengthy multi-page behemoth (which has grown over time) that expects no less of you than to understand all functional and architectural details of how the failover works. It's a lot for someone that just wants to setup backup internet. But mwan3 can and does work. | <small>* the current mwan3 page is a lengthy multi-page behemoth (which has grown over time) that expects no less of you than to understand all functional and architectural details of how the failover works. It's a lot for someone that just wants to setup backup internet. But mwan3 can and does work. | ||
*2 ctrl-f for firewall comes up with half a dozen mentions of firewall masking (something done automatically) and one easily missable note, for GUI setup only, about adding the new wan2 to the firewall zone. An absolutely required step.</small> | *2 ctrl-f for firewall comes up with half a dozen mentions of firewall masking (something done automatically) and one easily missable note, for GUI setup only, about adding the new wan2 to the firewall zone. An absolutely required step.</small> | ||
− | |||
− | |||
===misc=== | ===misc=== |
Revision as of 08:18, 28 October 2020
Recommended Router
This is a rack mount router. Flashing is easy and well supported. It does not include wireless. In my experience (with tplink routers) wifi can have issues, so I recommend using a dedicated wireless AP. A more modular setup.
Enterprise companies (i.e. if you have $$$) can look at https://www.opencompute.org/products
Recommended wireless AP
Open mesh is good. But they were bought out. Unifi is another option. Only buy wifi APs that support openwrt.
Tips
port forwarding
Port forwarding is two steps:
- redirect port from outside to internal (NAT)
- allow access from outside to inside via this port (firewall)
Contents of /etc/config/firewall
Note: Proto can be 'tcp' OR 'tcpudp' OR 'udp'
reserved ip / static lease
Contents of /etc/config/dhcp
ref: https://openwrt.org/docs/guide-user/base-system/dhcp_configuration#static_leases
I tried to add this to the wiki, but someone (https://openwrt.org/docs/guide-user/base-system/dhcp_configuration?rev=1596434574) decided to replace my simple solution with an obfuscated one that requires uci commands. So instead, it will remain here. EDIT: I added it back. See how long that lasts...
openvpn
opkg install openvpn-openssl
Contents of /etc/config/openvpn
And your .ovpn in /etc/openvpn/.
aliases
Put in /etc/profile. e.g.
export TERM=xterm alias vpnme= 'openvpn --config /etc/openvpn/myconfigfile.ovpn & ./script.sh &'
mwan3
Mwan3 can be tricky. The wiki lacks a quick start*. The following files get edited:
/etc/config/network /etc/config/mwan3 /etc/config/firewall
If you add a new WAN interface, (e.g. wanb or wan2) you must add wanb to the existing wan firewall zone for outgoing comms. How this is handled differs from 17 to 19.*2
Balanced policies can have issues with connections jumping from one wan to another.
* the current mwan3 page is a lengthy multi-page behemoth (which has grown over time) that expects no less of you than to understand all functional and architectural details of how the failover works. It's a lot for someone that just wants to setup backup internet. But mwan3 can and does work.
- 2 ctrl-f for firewall comes up with half a dozen mentions of firewall masking (something done automatically) and one easily missable note, for GUI setup only, about adding the new wan2 to the firewall zone. An absolutely required step.
misc
start wifi
wifi up
display (RAM based) logs (note that this is not in /var/log/messages...)
logread
various links i found interesting
- https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm - speed test, and traffic shaping to speed up a 'slow' network. protip: use x86 instead of arm if openwrt is slow.
- https://openwrt.org/docs/guide-user/services/nas/netatalk_configuration - apple time machine backup server
- https://openwrt.org/docs/guide-user/network/wan/multiwan/mwan3 - failover for wan. i have used this before, and it worked well.
- https://openwrt.org/tag/faq - FAQs
- https://openwrt.org/docs/techref/flash.layout - Partitions on
HDDflash. And overlay fs.
- https://openwrt.org/docs/techref/start - Technical Reference. Has some informative dives into various aspects of low power routers. As an example see this link on flash: https://openwrt.org/docs/techref/flash IME, flash is built in obsolescence. usb drives, sd cards, and onboard flash tend to last much less than advertised. not recommended. SD and SSDs are a trap. from this: even 'reading' flash can cause bad blocks. that's right, even reading. therefore flash is guaranteed to fail. tech companies love it.