1
0
mirror of https://github.com/rtr7/router7.git synced 2024-05-06 15:54:52 +00:00

36 Commits

Author SHA1 Message Date
ce66287189 netconfig: make the MTU configurable
Just in case we need to set it on an uplink0 interface at some point, for example.
2022-06-15 23:19:43 +02:00
7d936f4844 allow configuring extra routes
Useful for routing IPv6 subnets through a WireGuard tunnel.

related to https://github.com/rtr7/router7/issues/52
2022-06-06 14:25:25 +02:00
f52deeed03 allow configuring extra addresses on interfaces
Useful when you need IPv6 and IPv4 addresses on a WireGuard tunnel.
2022-06-06 14:25:25 +02:00
40f8eb5b1b fix wireguard availability test 2022-06-06 14:25:25 +02:00
593cd8c12d export input/output nftables counters as well as forwarded
Thus far, we have only had forwarded bytes metrics.

Notably, forwarded bytes does not include bytes that were sent by the router
itself, e.g. by the webserver or rsync server running on the machine.

fixes https://github.com/rtr7/router7/issues/71
2022-03-08 22:47:18 +01:00
8dc93c66c4 netconfig: enable NAT hairpinning for port forwardings
fixes https://github.com/rtr7/router7/issues/53
2022-03-08 09:32:09 +01:00
cffd872346 netconfig: implement bridge configuration
fixes https://github.com/rtr7/router7/issues/65
2021-06-06 15:43:55 +02:00
876f8e320f netconfig: de-configure old DHCPv4 addresses from uplink0
It is generally not a good idea to have multiple IP addresses on the same
interface unless managing their relative priorities via metrics etc.

During an outage, I noticed that with multiple IP addresses,
Linux was using the old obsolete one to send out packets,
which does not work with the ISP.

With this change,
we still hold on to IP addresses for as long as possible,
but no longer.

fixes issue 
2020-09-12 19:58:47 +02:00
281f876834 integration/netconfig: verify wg(8) is available
The kernel used on GitHub actions now allows creating wireguard interfaces
apparently.
2020-07-02 21:14:35 +02:00
fe68c2dd52 internal/radvd: add support for DNSSL ()
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2020-05-23 19:52:52 +02:00
f87891a74b integration/radvd: panic in goroutine instead of fatal
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2020-05-09 16:56:51 -04:00
107a8f0425 internal/radvd: switch to github.com/mdlayher/ndp types ()
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2020-05-09 22:50:44 +02:00
9fe38edec0 netconfig_test: force an order for IP address golden output 2019-08-07 18:13:52 +02:00
c0067c5aa5 change diff order to -want +got
This is easier to read and consistent with how we do things at work.
2019-07-11 08:42:21 +02:00
414a7c025b use nft’s --numeric flag for stable output across 0.9.0 and 0.9.1
nftables 0.9.1 started printing e.g. “priority 0” as “priority filter”.
2019-07-11 08:39:08 +02:00
554d7fa8bf netconfig_test: fix goldens after nftables change
The nftables package started honoring the rule position (insert vs. append), and
it turns out our goldens have been wrong all along. Now the configured order
matches the golden order.
2019-07-11 08:28:33 +02:00
fa91770b09 integration/dns: 8.8.8.8’s RDNS changed to dns.google. 2019-07-01 08:55:10 +02:00
badee1eef8 netconfig_test: skip test if WireGuard is unavailable 2018-11-26 18:43:04 +01:00
ec4f1f4dc5 netconfig: implement WireGuard support
To set up a tunnel, create a /perm/wireguard.json as illustrated in
netconfig_test.go, and don’t forget to adjust your /perm/interfaces.json with
the address configuration for the WireGuard tunnel.

Note that static routes cannot currently be configured, so the usefulness is
limited. If you have a use-case you’d like to see covered, please explain it in
https://github.com/rtr7/router7/issues/14
2018-11-26 18:29:03 +01:00
b6a5227d49 netconfig_test: better diffs, refactor for clarity/brevity 2018-11-26 08:46:59 +01:00
127bdc466e netconfig_test: use ip -netns instead of ip netns exec ip 2018-11-26 08:32:38 +01:00
df9a40557c dhcp4: correctly check errors from c.once 2018-11-21 08:41:24 +01:00
30e9a6677b integration/dhcpv4: print unified line-wise diff
This is much more readable than the go-cmp Diff() output when dealing with
[]string lines.
2018-11-18 14:29:30 +01:00
2e8e0daa0a implement TCP MSS clamping (for non-ethernet uplinks)
We didn’t have a need to clamp the TCP Maximum Segment Size (MSS) up until now,
because fiber7 uses an MTU of 1500.

Because Path MTU discovery is often broken on the internet, it’s best practice
to limit the Maximum Segment Size (MSS) of each TCP connection, achieving the
same effect (but only for TCP connections).

This change is beneficial when running router7 behind a non-ethernet uplink,
such as a Fritz!Box cable modem.

This has no adverse effect on fiber7: after clamping, the MSS is still 1440, as
without clamping.
2018-10-22 18:54:25 +02:00
f7638dfeaa netconfig_test: test updating port forwardings after installation
This uncovered an nftables issue:
695079ebff
2018-10-03 18:24:54 +02:00
b03596f1c5 nftables: use stateful object counters
This way, we can atomically get and reset them.

fixes https://github.com/rtr7/router7/issues/3
2018-08-08 23:15:21 +02:00
ea10307b5d dhcpv4: replace hard-coded midna → os.Hostname() 2018-07-14 17:35:25 +02:00
9e0f83a7cf integration tests: send ip netns add errors to stderr, too 2018-07-14 15:43:47 +02:00
b347ed74c5 update import paths 2018-07-09 08:54:04 +02:00
8615c40fac netconfig_test: reset DefaultCounter to catch preservation issues 2018-06-28 20:08:23 +02:00
ff7aa8f2cb add copyright notices 2018-06-28 20:08:23 +02:00
89e1276ad4 dns: simplify resolving code 2018-06-26 09:33:23 +02:00
8e95e25442 radvd: announce link-local ipv6 address for DNS 2018-06-26 09:04:05 +02:00
10df129c1f dns: listen on all private IP addresses 2018-06-26 08:53:20 +02:00
a881f6b61e cut down on test noise 2018-06-24 12:06:40 +02:00
5a07d6696d split integration tests into multiple packages
This makes them complete more quickly (because they are run in parallel) and
invalidates only the cache for the integration test I’m working on, not for all
of them.
2018-06-24 11:46:49 +02:00