OpenWRT generates burst of WAN traffic?

I recently rebuild my OpenWRT from scratch so I have some more focus on it.
And checking vnstat I noticed something odd on the 5-minute graph:

the wan interface mostly is identical to the br-an interface, but every so often has an extra 1, 2 sometimes even 3MB.

This is only visible if I do not do anything for a while, so the relatively low numbers are not drowned out by real volumes. But it intriges me. If on wan but not on br-lan, it means it is downloaded on the router itself. See 6:25 (obviously I started the PC day only at 7:00)

  • What might be downloading something local to the router?

As far as I know, I have no stuff installed that I know would be downloading. No ad-blocker downloading lists, no ftp server, no services other then a basic router with firewall.

Either there is something downloading on a clean OpenWRT (and if so, I hope it is nothing sinister) or I have burst of very intensive external hacking attempts (and if so, I hope the OpenWRT is hardened)

At some point I may script a tcpdump, but maybe someone here already knows what this is?

what does this mean, exactly ?

the only router generated traffic (using a vanilla openwrt image) would be NTP and DNS queries for NTP server lookup.

3 Likes

I upgraded my Archer c2600 from v21 to v24, which means due to the new kernel based DSA switch I did so without keeping config files, so I reconfigured from scratch.

As to renewed focus: Having reinstalled it only last sunday, I have checked it a few times yesterday, which can be considered new focus, because honestly I rarely checked it over the last 3 years and in a month or so hope to not have any need to check it for at least another 3 years.

It is a NTP client and server yes, but I do not think a NTP query would be 3MB. For DNS it is the standard dnsmasq, which I seem to recall does not buffer any DNS lookups. The old router version was setup for papertrail syslog, but this one not (yet)

Take a packet capture and dive into it with e.g. wireshark?

As I see the value is on RX so maybe you just got intensively port scaned....

4 Likes

Yes, that's what I meant with tcpdump. tcpdump generates wireshark compatible output. Not trivial though, as I cannot predict what time of day to dump it, and I cannot keep tcpdump running all night on such a limited storage device.

I'd have to script small tcpdump sections every minute or so into /tmp (RAM storage) for both wan and br-lan, and then script so it deletes the ones with no significant size difference.

Hence my question: anyone happen to already know the answer before I commit to that effort?

Look here:

you do not need to store the data on the router, but can pipe it directly to a beefier machine...

On macos I use:

### MACOS
# the following works, but if you ^C the command Wireshark shuts down. -> Stop capturing in wireshark and save the file then close wireshark to end the tcpdump capture as well
ssh root@192.168.42.1 tcpdump -i pppoe-wan -U -s0 -w - 'not port 22' | /Applications/Wireshark.app/Contents/MacOS/Wireshark  -k -i -
### Seems to work
1 Like

Possible. given I have seen it 3 times now, and the 5 minute log only shows 1 hour. it means that happens a lot more than I would have guessed. Roughly about twice an hour (see 6:55 also)

https://www.cloudshark.org/login still have a 30 day free trial, it seems, install the packages and set up the monitoring, review it the next day.

note, everything you do online (IP wise, most stuff is encrypted) will be sent to them.

LOL, it would appear @moeller0 beat me to it :slight_smile:

EDIT: nope :frowning:

1 Like

Hardly, you are proposing an equally useful but different method, one that, as far as I can tell, does not require a local host...

true, but the same product was mentioned in the thread you linked to.

no worries :slight_smile:

1 Like

I'll see if I can setup something for tonight or failing that, this week.

Maybe it indeed is a port-scan or something. Its seems plausible and would enable me to nicely ignore it, but it nags me. For example, afaik (and I am not an expert) port scans mostly happen on well known ports. 22, 80, 553. To fill up 1Mb it would need to indiscriminately scan all or at least all low ports. Lets see if I can catch it in the act, and hopefully see no answers.

I have DROP as default action for my firewall (not running openwrt on my router) instead of REJECT, it does make a difference ...

I usually only have the same three hosts scanning me, every day...

   From 79.124.62.122 - 397 packets to 397 tcp ports
   From 79.124.62.126 - 361 packets to 361 tcp ports
   From 79.124.62.134 - 367 packets to 367 tcp ports 
1 Like

If drop is default you are safe

I know, just saying these three seems to be (pretty much) the only ones ignoring the DROP, most other seem to move on when there's no reply ...

Interesting. I was just wondering earlier today, why do we have reject as default. I though wisdom was to let them timeout on a reply rather then assist them with an immediate option to retry the next port.

Anyway, I cheaped out on the scripting, and do a cron every minute to a USB stick:

* * * * * tcpdump -G 20 -W 1 -w /mnt/sda1/tcpdump-%Y-%m-%d_%H.%M.%S.dmp -i wan

So every minute I have a 20 second sample size. I'll start it just before I go to bed and check in the morning.

Because for non-malicious traffic letting the other side know why things failed is a great help in debugging connectivity issues...

2 Likes

So a few notes:

  • This way is hard to find the correct sample as I could not merely look at the size. I would really need to also tcpdump br-lan at the same time, so I can compare sizes. Now i had some legit through traffic showing up.

  • On a idle sample a nice and clean 20KB of mostly DHCP and some PPP handshaking. Most of the DHCP is not even to/from my router, just a generic "who there" from the ISP. Not sure why they do that every second. I did find a screen where my IP shows up as target, but they are rare.

  • I think I did find the culprit. But I am not entirely sure what I am looking at. My cautious guess is a neighbor on my shared PON fiber doing a UDP broadcast to a 224 address on a VLAN and leaking that onto the WAN side of his routerboard. Please have a look and give your opinion.

But it may also be some ISP equipment doing the same.
Because it might be a neighbour, I am blanking his IP

Anyway, not a port scan. At least not this time. Will go to default DROP regardless.

You can black-hole route multicasts if they do not serve any beneficisl purpose.

Do you mean you recognize this as a "route multicast" ? Any clues or hints?

Anyway, I have nothing in my router that responds, so given it is UDP it means it is practically already black-holed. But yes, I did change my default from reject to drop.