jeff___m has joined #openwrt-devel
jeff___m has quit [Ping timeout: 480 seconds]
philipp64 has joined #openwrt-devel
Tapper has quit [Quit: Tapper]
minimal has quit [Quit: Leaving]
noltari has quit [Ping timeout: 480 seconds]
jeff___m has joined #openwrt-devel
noltari has joined #openwrt-devel
jeff___m has quit [Ping timeout: 480 seconds]
cp- has quit [Ping timeout: 480 seconds]
jeff___m has joined #openwrt-devel
jeff___m has quit [Ping timeout: 480 seconds]
autkin has left #openwrt-devel [#openwrt-devel]
autkin has joined #openwrt-devel
noltari has quit [Ping timeout: 480 seconds]
autkin has left #openwrt-devel [#openwrt-devel]
noltari has joined #openwrt-devel
jeff___m has joined #openwrt-devel
tSYS has quit [Quit: *squeak*]
jeff___m has quit [Remote host closed the connection]
jeff___m has joined #openwrt-devel
tSYS has joined #openwrt-devel
jeff___m has quit [Remote host closed the connection]
jeff___m has joined #openwrt-devel
jeff___m has quit [Ping timeout: 480 seconds]
jeff___m has joined #openwrt-devel
jeff___m has quit [Ping timeout: 480 seconds]
slh has quit [Remote host closed the connection]
slh64 has quit [Quit: gone]
slh has joined #openwrt-devel
slh64 has joined #openwrt-devel
SpectreDev_01 has joined #openwrt-devel
<SpectreDev_01> Hmm weird I got openwrt fully working on a ipq807x device but not getting the full speed I have 1.1/1.2gbps connection but only getting 600mbps at peak
<stintel> not the best article probably but should give you the gist: https://kb.netgear.com/19668/Link-Rate-and-Transfer-Speed
<slh64> ipq8071a or ipq8072a/ ipq8074a?
<KGB-2> https://tests.reproducible-builds.org/openwrt/openwrt_x86.html has been updated. (100.0% images and 100.0% packages reproducible in our current test framework.)
<slh64> the network/ switch drivers currently available are very basic and don't even support checksum offloading (without nss), meaning they're rather slow and depend a lot on the CPU power
<slh64> that's where 1.4 GHz (ipq8071a) vs 2 4 GHt (ipq8072a+) makes a material difference
<slh64> around 600 MBit/s would match my experiences with ipq8071a, but resulta will vary if you add PPPoE or sqm into the mix
<SpectreDev_01> slh64: it's IPQ8174 basically rebranded ipq8074
<SpectreDev_01> Hmm I've tried to build with nss but it ends up killing WiFi and ethernet
goliath has joined #openwrt-devel
robimarko has joined #openwrt-devel
<mrkiko> Ansuel: Great work for the nbg7815 fan - still, can you explain me little bit what you did with the aqr thermal zone, how the correlation between it and the tmp103 works?
<mrkiko> Ansuel: plain curiosity
<mrkiko> Ansuel: furthermore, on an unrelated note, wonder if bluetooth works for you
<mrkiko> Ansuel: on a unit on which I tested it, it seems to initialize and wortk but sees no devices around
autkin has joined #openwrt-devel
hanetzer1 has joined #openwrt-devel
hanetzer has quit [Ping timeout: 480 seconds]
SpectreDev_01 has quit [Quit: Connection closed for inactivity]
autkin has left #openwrt-devel [#openwrt-devel]
autkin has joined #openwrt-devel
<f00b4r0> is bridge leakage expected? Context: router two (uci) network interfaces, "LAN" and "DMZ". uhttpd listening on "LAN" ip to allow access to Luci. No forwarding setup between DMZ and LAN. Client connected to DMZ can access luci by inputing the "LAN" IP address
<f00b4r0> both network interfaces are part of a bridge-vlan
<f00b4r0> and sit on different vlans
<f00b4r0> LAN and DMZ are part of different firewall zones. This is on 23.02
<f00b4r0> netstat shows ip connection from DMZ client ip to LAN router ip
<f00b4r0> darn. I thought this only applied to ip aliases on the *same* interface
<jow> afair, unless rp filtering is applied, any local address is accepted
<f00b4r0> let's see if rp_filter fixes it
<f00b4r0> thanks for the pointer
<f00b4r0> it doesn't
* f00b4r0 curses
<f00b4r0> how are we supposed to secure a multinetwork router? ;P
<jow> the zone model currently only covers inbound interfaces but does not care to which IP a packet was desintined
<jow> I suppose you can only further lock it down by applying destination IP based filtering
<f00b4r0> *sigh*
<f00b4r0> that seems like a major hole. I don't expect most users to even be aware of this problem until it bites them (as it did for me)
<jow> *destined
<jow> are both zones accepting input?
<f00b4r0> no
<f00b4r0> lan is accepting input, dmz is reject with selective open ports
<f00b4r0> one of which being port 80
<jow> covering different interfaces?
<f00b4r0> yes
<f00b4r0> vlan-lan and vlan-dmz, respectively
<jow> maybe it's indeed some bridge leak then, because that should work
<f00b4r0> that's my feeling as well
<jow> did you enable bridge port isolation?
mcbridematt has quit [Remote host closed the connection]
<jow> that should prevent port-to-port arp
<jow> might also flush arp table and/or reboot afterwards
<f00b4r0> I see an option in luci "reverse path filter", currently set to "disabled"
<f00b4r0> but I assume this toggles rp_filter?
<jow> yes
<f00b4r0> where does one configure bridge port isolation?
<jow> it's a per-device option
<jow> but probably only makes sense if dmz and lan correspond to different physical ports
<f00b4r0> so enabling "strict filtering" option apparently broke everything :P
* f00b4r0 reboots router
<f00b4r0> so after reboot and strict filtering enabled, situation is unchanged
<f00b4r0> this is really bad
<jow> enabled where exactly?
jeff___m has joined #openwrt-devel
<jow> on the respectrive vlan interfaces?
<f00b4r0> on the bridge interface
<robimarko> Whats the HW?
<jow> but the ingress will not be the bridge interface
<f00b4r0> robimarko: mt7621
<f00b4r0> offloading disabled
<jow> it will be something like br-lan.X
philipp64 has quit [Ping timeout: 480 seconds]
<jow> so you need to enable rp_filter for each vlan sub interface of the bridge
<jow> because that is the one involved in routing
<f00b4r0> I just ran this: for i in /proc/sys/net/ipv4/conf/*/rp_filter; do echo 1 > $i; done (i'm using an ipv4-only stack for now)
<f00b4r0> it doesn't fix the problem
<jow> did you flush the neighbor cache?
<f00b4r0> ran ip neigh flush dev vlan-lan
<f00b4r0> and vlan-dmz
jeff___m has quit [Ping timeout: 480 seconds]
<f00b4r0> tried adding a rule to filter by ip but that doesn't work either (as expected since forwarded traffic shouldn't occur anyway)
<f00b4r0> really looks like a leak
philipp64 has joined #openwrt-devel
Tapper has joined #openwrt-devel
<f00b4r0> seems there's no way to filter this out. It's a small nightmare for my use case
<f00b4r0> this suggests it's impossible to do selective firewalling on device, which seems very broken if it's actually the case
* f00b4r0 tries adding arp_ignore to the mix
<f00b4r0> doesn't work. wth.
<jow> well did you try to formulate an input rule?
<jow> something like iifname br-lan.2 daddr != 10.0.0.1/24 drop
<jow> that should essentially be what rp_filter 2 is supposed to do
<jow> *rp_filter 1 I mean
<jow> remove the dest line
<f00b4r0> but regardless, this issue seems to entirely defeat the purpose of bridge vlan_filtering
<jow> to make it an input rule
<f00b4r0> still doesn't work
<f00b4r0> my money is on bridge leak.
<robimarko> It could be the switch itself leaking
<f00b4r0> this shouldn't happen. I'm sure you can see the implications
<f00b4r0> robimarko: i'm testing with a wireless client, in case that matters
<robimarko> You are not using any of the switch ports=
<f00b4r0> was that a question?
<robimarko> Yeah, missed the key
<f00b4r0> I am using the switch ports, one is uplink (wan, different vlan/fw zone) and the other is in lan zone
<robimarko> Then the switch itself could be leaking despite VLAN filtering being enabled
<f00b4r0> both switch ports are enslaved to the global bridge-vlan
<f00b4r0> robimarko: well ok but why is the OS reporting the cross connection?
<f00b4r0> tcp 0 0 192.168.1.1:80 10.234.100.163:60852 ESTABLISHED
<f00b4r0> the 10.234 is the wireless client in DMZ zone
<f00b4r0> this is crazy.
<f00b4r0> i need to eat, can't think straight on an empty stomach ;P
<f00b4r0> holy macaroni; this affects all zones. It possible to talk to services listening on the WAN zone despite filtering on specific IP addresses
<f00b4r0> this is a disaster.
<KanjiMonster> f00b4r0: currently no DSA driver supports/handles port isolation (BR_ISOLATED) https://elixir.bootlin.com/linux/v6.7-rc5/C/ident/BR_ISOLATED
<jow> f00b4r0: but it has always been this way for me
<jow> f00b4r0: that's why we keep explaining users that they should port scan their wan ports from the outside
<jow> if you "come in" via an interface that allows input, you can reach all IP addresses local to the router
<jow> regardless of their zone policies
<jow> which also makes sense since zone policies are source interface bound
<f00b4r0> i'm sorry I don't understand
<f00b4r0> what I'm seeing is: it's impossible to firewall a multihomed router
<f00b4r0> in a bridge-vlan configuration
<f00b4r0> someting that bridge-vlan was, AIUI, designed to solve.
<jow> was it?
<f00b4r0> I think it wsa, but that's not the point anyway
<jow> it's purpose is to segregate a bridge into a bunch of vlans
<jow> semantics should be identical to those of a bunch of nics
<f00b4r0> if you have bridge-vlan and one of its member allows incoming packets, as soon as you sit on a routable interface to any of the other ones, you can access everything
<jow> *everything on the router*
<f00b4r0> which means it's impossible to segregate router services per interface
<f00b4r0> yes
<f00b4r0> which is very bad when one of your interface serves an untrusted network
<jow> can you please share your "nft list ruleset" as well as your network configuration?
<jow> still struggling to understand your setup
<f00b4r0> but what makes no sense to me here is that there seems to be some routing involved, since the 10.234 and 192.168 networks are routed on the router (according to netstat output), *despite* this being not allowed.
<jow> yes, I think ingress from DMZ is simply allowed
<jow> maybe the firewall ruleset is incomplete
<jow> or zones are overlapping in scope
<f00b4r0> what's the curl-based pastebin url if someone can jog my memory?
<jow> some command | curl -F 'sprunge=<-' http://sprunge.us
<f00b4r0> thanks
<jow> or: some command | nc termbin.com 9999
<f00b4r0> ruleset: http://sprunge.us/8DnRih
<f00b4r0> config/firewall: http://sprunge.us/ZRuMBz
<f00b4r0> config/network: http://sprunge.us/4EScFJ
<f00b4r0> i have anonymized some source IPs to 1.1.1.1 in the first two
<f00b4r0> but that's irrelevant to the problem at hand
<jow> so what service are you reaching that is not supposed to be reached?
<f00b4r0> the dmz is "captive"
<f00b4r0> i'm reaching luci from dmz, despite having set uhttpd to listen only to 192.168.1.1
<f00b4r0> and i'm reaching the udp CoA responder on the wan side, to give two examples
<jow> tcp dport { 80, 443, 3990, 3991 } [...] accept
<f00b4r0> yes, as I said, port 80 is open on the dmz for other purposes
<f00b4r0> (it's a captive portal, this is for CPD detection)
<jow> right now the ruleset allows tcp/80 to any ip address local to the router (due to the weak host model)
<f00b4r0> should I provide the hcontent of config/uhttpd to illustrate?
<f00b4r0> jow: except enabling rp_filter and arp_announce doesn't engage "strong host"
<f00b4r0> the CoA responder I tested from LAN zone tbh
<f00b4r0> i really must eat, I'm totally starving
<jow> the daddr 192.168.1.1 reject rule comes too late
<jow> you should move it before the port accept rule
<jow> and I would generalize it into !a.b.c.d/e where a.b.c.d/e is the subnet of the DMZ interface
<jow> or potentially even !a.b.c.d without mask to only allow input to the routers ip in this subnet
<f00b4r0> so moving the rule seems to work. But why spelling out that rule work when according to the weak host model it shouldn't matter either?
<jow> the weak host model applies to routing / binding, not netfilter
<f00b4r0> and does that mean that I need to write rules for every exclusion case? that's combinatorial that can grow very quickly when this should be handled by the default "DROP" targets of each zone, shouldn't it?
<jow> as I wrote eralier, zones are ingress interface bound
<jow> in engish "allow any traffic destined for any address local to this router, received via interface X"
<f00b4r0> well I don't follow: the "no forwarding" rule is a netfilter one, is it not?
<jow> for netfilter this isn't forwarding
<jow> forwarding is when egress interface != ingress interface
<f00b4r0> ok, but then rp_filter should address this case?
<jow> or rather when there's any egress interface
<jow> input is every case where the routing vertict is to deliver the packet to the local system
<jow> *verdict
<f00b4r0> but at the end of the day, the packet comes from the dmz interface and is sent back from an IP belonging to the lan interface
<f00b4r0> so why is rp_filter not working in that case?
<f00b4r0> really must eat, bbiab. thanks for the help still
<jow> I think rp_filter might not help after all, it validates the source ip, not the intended destination ip
<jow> arp_filter 1 sounds like it would achive the desired effect
<jow> or arp_ignore=2
<jow> 2 - reply only if the target IP address is local address configured on the incoming interface and both with the sender’s IP address are part from same subnet on this interface
<jow> a complementary arp_announce=1 might make sense but is not crucial the way I understand it
<jow> so arp_ignore=2 should prevent "cross talk" between source ip in subnet X and lokal destination ip subnet !X
<jow> *local
jeff___m has joined #openwrt-devel
castiel652 has joined #openwrt-devel
<f00b4r0> jow: testing now
<f00b4r0> it doesn't work. Tested arp_filter=1 + arp_ignore=2 + arp_announce=1 + rp_filter=1
<f00b4r0> jow: so basically, that means that if you have N vlan interfaces that must all be segregrated from each other in terms of available services provided by the router, you need N*N individual rules? That seems fairly brain damaged
<jow> did you try with a reboot after setting that in sysctl.conf or whatever?
<jow> why N*N ?
<f00b4r0> i flushed the neigh cache but I can try a reboot
<jow> just one per interface
<jow> or zone/realm
<f00b4r0> because option src doesn't take a list?
<jow> iif $in_infce daddr != $ip_of_in_iface drop
<f00b4r0> and you need one rule per src iface for each iface
<jow> yeah, so N
<jow> not N*N
<f00b4r0> iface A, B, C. rules: block from A to C; block from B to C; block from B to A; block from B to C; block from C to A; block from C to B
<f00b4r0> N-1 * N-1
<jow> if the objective is to simply allow attached subnets to only reach the router address in that subnet then you'll need one rule per subnet
<jow> not more
<f00b4r0> how would that look in uci?
<jow> config rule; option proto all; option src captive; option dest_ip !captive; option target reject
<jow> the lack of a "dest" option makes it an input rule instead of a forward one
<jow> and it should reject any attempt to reach an ip address on the router that is not part of the captive subnet for traffic received via the captive interface
jeff___m has quit [Read error: Connection timed out]
<f00b4r0> ok so test post reboot still doesn't work
<f00b4r0> (with the above sysctls set)
<jow> consider adding "option family ipv4" if you do not want this rule to cover ipv6 subnets as well
<jow> yeah, so either we're completely misunderstanding the purpose of these sysctls or something else is broken there
<f00b4r0> when you say "option dest_ip !captive", you mean it written exactly like that? I thought it took an IP value?
<jow> yes
<f00b4r0> ok
<f00b4r0> will test
<f00b4r0> and I think something else is broken
<jow> fw4 will resolve names to related subnets
<jow> and the '!' negates it
<f00b4r0> *nod*
<f00b4r0> I assume such rules must be at the very top of config
<jow> so !captive should expand to a negation of all ip subnets reported by "ifstatus captive"
jeff___m has joined #openwrt-devel
<f00b4r0> after zone definitions
<jow> yeah
<jow> at the very least they should appear before the port opening rules
<f00b4r0> indeed that seems to work
<jow> you could however also restrict the opening rules
<f00b4r0> (i still have the sysclts enabled)
<jow> by adding a "option dest_ip captive" to it
<f00b4r0> that's error prone
<jow> or whatever the zone name is
<f00b4r0> the basic assumption is that cross talk should never occur
<f00b4r0> (on a side note I'd think enabling some of these sysctls by default would be a good idea on a router system, provided that they actually work, which doesn't seem to be the case here)
<jow> that would require extensive testing but in principle I agree
<jow> the behaviour of arp_ignore=2 (if it actuall matches the description) seems like a desirable default
<f00b4r0> indeed
<jow> there's also a "fib" expression in nftables
<jow> which generalizes the above suggested rule semantics without the need to mention specific IPs in the ruleset
<jow> filter prerouting fib saddr . iif oif missing drop
<jow> nvm, this is rp_filter smenatics, not arp_filter=2
jeff___m has quit [Remote host closed the connection]
jeff___m has joined #openwrt-devel
<jow> but one take away for me: forget about rp_filter wrt. this scenario, rp_filter just ensures that there's any route leading back to the source ip of the inbound flow
<jow> while we want to ensure that the dest ip of the ingress flow matches the (one of the) interface subnet(s) of the ingress interface
<f00b4r0> *nod*
<f00b4r0> I think the default behaviour is a fairly severe security hole. Especially for users unaware of the host model (even though *I* was aware, I clearly misunderstood the implications)
<jow> I alwas took it something given, it's basically always been this way
<f00b4r0> when you set zone rules which do not explicitely allow forwarding between zones, you certainly don't expect router services to be accessible "cross-zones"
<jow> users are frequently bitten by this when they port scan their wan ip from lan to test their firewall policies
<jow> and wonder why everything is unfiltered
<jow> in an ideal world, the kernel would treat flows terminating locally but crossing subnet boundaries as forward and not input
<jow> but afaik there's no such mechanism
<jow> you'll always need some sort of additional measure (sysctls, nft filters, ...) to differentiate the "input" vs. "input but different subnet" case
<f00b4r0> I suppose it makes sense in a server context. It certainly doesn't in a router one.
<jow> if this lands we could build default nft rules that compare src and dest subnets in the input case
<jow> maybe this is also a topic worth discussing in #netfilter
<jow> not sure if there's a good solution yet that doesn ot require spelling out involved subnets
<f00b4r0> it seems really weird that there isn't a knob to enforce the strong host model
<f00b4r0> which AIUI is all that's really needed
<jow> also there's IPv4
<jow> all those sysctls (rp_filter, arp_*) only apply to IPv4
<jow> not IPv6
<f00b4r0> indeed
<f00b4r0> hmm that firewall rule seems to have some side effects
<f00b4r0> of the unwanted kind
<f00b4r0> namely it breaks DHCP
<jow> yeah it'll drop broadcast
<f00b4r0> shit
<f00b4r0> let's try restricting to udp/tcp
<f00b4r0> which should be pretty much all that matters
<jow> I'd suggest again to annotate your port-opening rules with a "option dest_ip $src_zone_name" - that might be the easiest and most robust fix (assuming the underlying default policy is reject or drop)
<f00b4r0> it means I have to adjust the OpenWrt defaults, which so far I did need to
<f00b4r0> did not*
<jow> how so? I assumed those port popening rules are yours
<jow> they're certainly not default
<f00b4r0> oh you mean the captive zone port opening rules?
<jow> yes
<f00b4r0> hmm
<jow> it will not prevent cross talk from lan to dmz
<f00b4r0> this is suboptimal
<jow> but it should prevent dmz to others
<f00b4r0> it will also marginally increase firewall load
<f00b4r0> and shouldn't be needed since these rules are supposed to only evaluate for the given zone
<f00b4r0> but we've been through this already :)
<jow> well they expand to `iifname $the_src_zones_interfaces`
<jow> they will enforce no layer 3 subnet boundaries
<f00b4r0> i wonder if that's not going to break the port 80 redirect
<f00b4r0> (used for CPD detection)
<f00b4r0> since i don't know what ip address the firewall redirects to behind the scenes
<f00b4r0> also why would that work when the src_ip filter doesn't?
<jow> the intention is to "open tcp/80 on the dmz-facing router ip address"
<jow> while without a specific destination ip restriction, it becomes "open tcp/80 to any local router ip address, regardless of which interface or subnet it belongs to as long as it is local and not being routed elsewhere"
<jow> is it counterintuitive? yes
<f00b4r0> *sigh*
<f00b4r0> ok so a bit of careful ordering actually "fixes" this
<f00b4r0> moving the drop rule after redirect *and* after allowing DHCP appears to have no further ill effect
<jow> yay
<f00b4r0> this whole charade is a trap if there ever was one ;P
<f00b4r0> so many ways to get this wrong.
<f00b4r0> jow: thanks a bunch for the help anyway!
* f00b4r0 notes to make a lengthy note about all that in his linux firewalling cheat sheet
autkin has left #openwrt-devel [#openwrt-devel]
autkin has joined #openwrt-devel
<rmilecki> Ansuel: was there any follow-up for the [PATCH 1/3] dt-bindings: nvmem: u-boot,env: Add support for u-boot,env-size
<rmilecki> i see you asked for help on that data size but I can't see any Rob's reply or V2
mentalow has quit [Quit: :]]
mentalow has joined #openwrt-devel
goliath has quit [Quit: SIGSEGV]
minimal has joined #openwrt-devel
<rmilecki> Ansuel: i gave it a try, Cc-ed by, let's see how it goes
<Ansuel> rmilecki just notice the series thanks for polishing it!
<Ansuel> need some time and I will try to add a Tested-by tag
<rmilecki> let's see what Rob says :)
<rmilecki> Ansuel: i didn't send U-Boot env driver patch yet, just binding stuff
<rmilecki> so there is not much to test
<Ansuel> oh ok
<Ansuel> bty where data-size is also used?
<Ansuel> seems a generic property but first time i see it
<rmilecki> Ansuel: nowhere else
<rmilecki> Ansuel: i think Rob wanted it to be generic so I added it to nvmem.yaml
<rmilecki> i may be wrong ofc
<rmilecki> Ansuel: for u-boot-env.c I'm just planning you adjust your [PATCH 2/3] nvmem: u-boot-env: Permit to declare custom env-size
<mrkiko> Ansuel: hi!!
Lynx- has joined #openwrt-devel
<Ansuel> rmileki sure!
<Ansuel> mrkiko hi!
<mrkiko> Ansuel: out of curiosity - does bluetooth work for you on nbg7815 ?
<Ansuel> not tested
<Ansuel> it doesn't?
<mrkiko> Ansuel: I think it generally does, but not in my unit. Was trying to understand if it's just the unit I tested it on or what...
<mrkiko> Ansuel: so was curious if you tested that
jeff___m has quit []
Lynx- has quit [Quit: Going offline, see ya! (www.adiirc.com)]
<castiel652> which bluetooth chip does it use?
hanetzer has joined #openwrt-devel
hanetzer1 has quit [Ping timeout: 480 seconds]
castiel652 has quit [Quit: Leaving]
autkin has left #openwrt-devel [#openwrt-devel]
autkin has joined #openwrt-devel
goliath has joined #openwrt-devel
autkin has left #openwrt-devel [#openwrt-devel]
goliath has quit [Quit: SIGSEGV]
goliath has joined #openwrt-devel
torv has quit [Remote host closed the connection]
torv has joined #openwrt-devel
torv has quit [Remote host closed the connection]
torv has joined #openwrt-devel
Mangix has quit [Ping timeout: 480 seconds]
minimal has quit [Quit: Leaving]
goliath has quit [Quit: SIGSEGV]
rsalvaterra has joined #openwrt-devel
goliath has joined #openwrt-devel
robimarko has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
autkin has joined #openwrt-devel
mcbridematt has joined #openwrt-devel
goliath has quit [Quit: SIGSEGV]