The network routers and the firewall protect the server from the bad data and the dupes.
Nope.
Routers are Layer 2 and Layer 3, they are not usually even able to tell what data is inside the packet.
Routers cannot tell the difference between an inventory packet, or an SSH packet from an SE dev logging into the server to check things.
Only thing the router layer has access to is stuff pulled out from the Layer 2 and Layer 3 of the TCP/UDP packets (and of course the data from the other types of payloads like Ping, DHCP, etc)
Which is just IP and the request payload. I don't think for TCP it even has access to headers yet (Thats layer 4 IIRC? Its been awhile since my networking classes)
Look up the OSI model layers for more info.
As for what your firewall can access, that entirely depends on your type of firewall, but firewall's jobs have **nothing** to do with data integrity (thats a total different layer)
Firewalls handle Authorization, so things like "Is this IP address allowed to access this data" and whatnot.
For example, if you want to prevent SSH access to your server except for only IPs on the same local subnet, **that** would be a firewall.
Firewalls at the machine layer handle blocking ports, and you can granularily control things like "UDP packets, on this port, from this IP range" as an example.
IE in my above example, you may do something like "TCP, Port 22, 192.168.0.*" would be a simple "SSH over local subnet" rule.
Handling of tracking duplicated items and whatnot in game?
Thats at the application layer and has nothing to do with firewalls. We are several layers past the firewall now.
We have gone through:
- Physical Layer
- Routing layer
- Load Balancing
- Subnet
- UDP
- Firewall
- Session/Ports
- Reverse proxy if applicable
- Encryption
And have finally arrived at the destination layer, the Application (So in SE's case, their server instance which hopefully is running on some kind of load balanced docker image swarm dealio, but I have zero clue what's popular in Japan, only what people usually do over here in NA, and over here it would usually for such a large scale operation be some kind of Kubernetes balanced setup, maybe cloud 3rd party, maybe local bare metal)
Now at the item duplication layer all of that is likely handled by the database itself automatically via a unique key lookup, so you simply just cannot have two entries with the same key, DB won't allow it, and trying to do so would just delete the first entry.
If not that, then they have some form of automation that can scan as a tool for hits.
And of course logging to track for such events so whenever SE sees a spike of item dupes they can track when and where it happened to quickly isolate the problem space (which usually is followed by them shutting the area down and performing emergency maint)
"Item Dupe" also is ambiguous, there are forms of item duping in the past that technically created a new totally unique item, which would not have
technically been an item dupe (server side), it would have truly seen them as two totally separate items.
In such a case, there is no easy way to detect that really. Only solution is having a system that tracks total items in and out and if you notice a sudden uncharacteristic jump up in item supply, that would be a red flag.
Throw some ML predictive searching on there if you
really wanna get fancy schmancy (though usually not necessary, but the entry barrier is getting lower and lower every month as ML tools from cloud providers get more and more accessible and cheaper)
Anywho, the concept of "A firewall preventing item dupes in a video game" is a clear demonstration of "I know the words but I have literally no idea wtf I am talking about"