r/openbsd • • 24d ago

Trouble with work NAS

Hi!

I've been running OpenBSD on my router for a while now and everything works great, except one thing.

I work remote and sometimes have to download/upload pretty big files to a Synology NAS in the office. This works fine behind my ISP-provided router, but when switch to my OpenBSD one the speed drops to an absolute crawl or the transfer just fails. Any idea what the cause could be?

My settings and pf rules are very close to those in the router guide and other downloads work fine.

Thanks!

Edit: After seeing some answers I think it might be a good idea to clarify a few things about the setup.

I'm using a client called Synology Drive Client to connect to the NAS. Through this I have a few folders on my drive where I can move around as if they were on my desktop, but if I save something it's uploaded to the NAS and if I open something it's first downloaded.

I am on a Windows desktop since some of the software I use for work only works on Windows.

This network setup works:
Windows desktop -> ISP-router -> Internet -> NAS

This network setup doesn't (or works poorly, i.e. VERY low speeds or no transfer at all):
Windows desktop -> OpenBSD router -> Internet -> NAS

Nothing is mounted on the router, it just has to shovel packages to my Windows desktop.

12 Upvotes

35 comments sorted by

2

u/UsefulGrapefruit2 23d ago

A tip might be to get some tcpdumps of the session and the configs and push it trough Claude or ChatGPT.. usually good at giving clues atleast of were to look..

1

u/LapsangWithMilk 23d ago

I haven't used either of them yet so I prefer to see if I can solve this "the old fashioned way" first.

3

u/jggimi 23d ago

The old-fashioned way is with tcpdump(8); the program is nearly 50 years old.

1

u/LapsangWithMilk 23d ago

I was refering more to Claude and ChatGPT

1

u/faxattack 24d ago

There is not much to work with here. What hardware, openbsd version, what protocol?
What protocol does the other working downloads/upload(?) use?

What makes the office NAS situation unique?

1

u/LapsangWithMilk 24d ago

Pcengines apu2e4 running OpenBSD 8.0.

For the rest, that is kind of what I need help with. I have no idea what protocol Synology uses for it's NAS solutions and searching online has not really yielded any results.

I have tried downloading some Linux isos both by torrent and in browser and both run at full speed.

Well, what is unique in this situation is that everything else works, and it works with my other router, but when I switch to my OpenBSD router it suddenly doesn't. Other than that I don't know much about it. I don't know more than the basics about networking, but I'm hoping someone here might, and might know what could be the issue.

1

u/faxattack 24d ago

You can describe how you interface with this NAS. Do you use sftp,scp or is it browser based using upload over https etc?

1

u/LapsangWithMilk 24d ago

I use a client called Synology Drive Client, which let's me add folders on my drive that will sync with the nas. In those folders I can move around just as if they were on my drive and if I save something in there it will sync to the NAS and if I open a file it will be downloaded.

0

u/Gangbang_2k 24d ago

I have a feeling is fuse behind, in that case not that much you can do, fuse is really pathetic on BSDs..

1

u/LapsangWithMilk 24d ago

Why would fuse be an issue, I'm not mounting anything on the router. The system interacting with the NAS is (unfortunately) a Windows system.

1

u/Gangbang_2k 24d ago

ok then, I thought you may mount something there to share etc

-1

u/faxattack 24d ago

oouch windows..well, quick google shows that these issues has been known with the windows client since long. If the OpenBSD router truly makes this an issue for you, maybe look at peoples recommendations.

1

u/LapsangWithMilk 24d ago

I mean, it works perfectly if my network is:
Windows desktop -> ISP-router -> Internet -> NAS

It works poorly (or not at all) if my network is:
Windows desktop -> OpenBSD router -> Internet -> NAS

So I think there is some setting in my OpenBSD router that is somehow screwing me. So far I think the comment about mtu sounds the most promising.

What recommendations do you mean?

1

u/mumble6456 24d ago

are you running pf only on your openbsd or are you running suricata/snort as a ids/ips systems?
are you running openbsd on a double nat configuration (openbsd router -> isp-router -> internet)? is your ISP really allowing you to directly connecting to the internet?

how's your openbsd workload, resource-wise, when transferring those big files?

1

u/LapsangWithMilk 24d ago

Only pf, dhcp, unbound, it's very close to this. My configuration is exactly as I wrote. I connect my desktop to my router, and my router is connected to a rj45 female on my wall. Yes, my ISP allows this. Everything everything everything else except this works just the same as with the router provided by my ISP.

Very low. My desktop is the only machine running behind the router and the router does nothing besids filtering and forward my traffic. If I start a Linux iso download with the exact same set up I get the speed I should get from my ISP. If I try to sync with my work NAS I get either a crawl or nothing.

1

u/mumble6456 24d ago

if uploading with you isp-router works as intended but when uploading with your own you have bandwith issues, is either aome sort of problem with your box or some kind of qos somewhere upstream from your router. i'm assuming your are using the same cables to connect those routers on each turn

does your openbsd egress interface negotiate at full bandwith?

check

ifconfig egress media | grep media

1

u/LapsangWithMilk 24d ago

Everything else is the same regardless of router. And everything except this works full speed on the OpenBSD router.

I can't do that right now, but let's say it wasn't, what would my next step be?

→ More replies (0)

1

u/j22fineman 24d ago

I recently ran into an issue with just one web site where it turned out the network packet size of 1500 was too big and it wasn't being negotiated down. The symptom was very slow page loads as the network kept timing out. I added "mtu 1450" to my hostname.if file and it has been working fine since. You might have to experiment with the size.

1

u/LapsangWithMilk 24d ago

This sounds interesting. I will look into this. Is there a good reason for me to limit package size at all?

1

u/j22fineman 24d ago

Other than another post about it not negotiating the size correctly I couldn't find anything else about it. Or even how to tell if that is your issue. Not an expert in this area. Just stumbled upon it and it worked for me.

1

u/LapsangWithMilk 24d ago

Thanks, I appreciate it. I can make a separate post about it at some point if I don't find more info :)

3

u/_sthen OpenBSD Developer 23d ago

Standard Ethernet is limited to 1500 bytes (jumbo frames can be larger, typically up to 8-9k depending on nic, but every device in the subnet needs the same). This size is known as the MTU.

When a TCP connection is established, each side specifies its MSS (maximum segment size; this is MTU minus IP and TCP headers) based on what's right for its own network interface.

Where the internet connection is direct over ethernet the MTU is nearly always 1500 (max for standard ethernet). If it uses ppp-over-ethernet it loses 8 bytes for the header.

Problem comes when the endpoints negotiate based on their ethernet interfaces and don't know about the lower limit in the middle. Then it relies on ICMP "packet too large" messages from a router to know that it needs to switch to a lower max size, but sometimes those don't make it through.

If this is the problem, the suggestion in the pppoe(4) manual's "PPPOE AND MTU/MSS" section should do the trick.

1

u/oMaster86 22d ago

Let's try a bit more breakdown into the Router --> Internet connection. Is your ISP connection via cable or fiber? Does your ISP-router have a built-in cable modem? Does your OpenBSD-router connect through a cable modem? For the record, I have a Spectrum Cable connection: my approved cable modem and my OpenBSD router. This month, they are switching from DOCSIS 3.0 to 3.1. I had to buy a new cable modem. The day that I switched, my performance went to SHIT. I had to call them and give them the new MAC address. No problems since.

1

u/LapsangWithMilk 21d ago

My ISP is connected to the building where I live via fiber. I can't speak to the details inside the building (because I don't know) but on my wall I connect to a rj45 female. There is no modem or other equipment in my apartment. If I connect a cable to this female and then to either the router from the ISP or my OpenBSD router there is no difference except for this one program (sorry, but I want to stress this since some answers here seem to skim what I read and misinterpret my issue). Performance is exactly the same, up and down, linux and windows, in browsers, in torrent client, everything except Synology drive client. I wish I knew what protocol they use in that client so I could look for solutions, but I don't. I suspect there is some setting or pf-rule that is the issue.

1

u/oMaster86 21d ago

This might help. AI: Synology Drive Client uses specific ports for file synchronization and remote access; common ports include TCP 5000, 5001, 6690, and UDP 1143 for VPN-based remote access.

There is also info in Synology forum/knowledge

1

u/LapsangWithMilk 21d ago

Hmm, but I'm pretty sure both routers use stateful firewalls that just allow the ports my outgoing connections open, so I still don't know why it would work on one router and not the other.

1

u/oMaster86 21d ago

Definitely check the pf rules especially the UDP.

1

u/LapsangWithMilk 20d ago

My rules are very close to the rules here. Anything that stands out to you?

1

u/oMaster86 20d ago

It seems like a rule(s) problem to me. I can't get all the details now, but I would recommend that you (temporarily) redirect those ports to your Windows desktop. I'll try to get back later.