I have a CHR with 2 WAN links and 1 LAN link. Its primary use is tunneling and BGP. Without adding the second WAN link, the setup was as follows:
- WAN link route was added to main.
- 3 Wireguard tunnels to upstream servers with a /30 IP range for each tunnel (3 in total)
- BGP connection to the upstream server. All learned routes were put into a table named ASN.
- all traffic from router (wireguard, dns, etc) went direct over the WAN link.
- routing rule for traffic over the LAN link: lookup using the ASN table (all devices on LAN get a public IP from my IPv4 or IPv6 space).
But, when adding a second WAN link, things dont work so well:
- added second default route to main now pointing at second gateway IP
- created 2 new tables, ISP1 and ISP2
- 2 more defaults, now with ISP1 and ISP2 and their respective gateways
- Have tried using a mangle rule, output chain, mark routing to given table, for a given dest IP
- updated wireguard servers to send traffic to new IP
So, what am i missing? Am i doing this correct, or is there a better way? Thanks.