Other upload firmware to a hard firewall

I've a hard firewall but after many hard reset i lost the web interface, firmware issue.
I suppose that with the command dd i can upload the firwmare with an ethernet link or a serial cable connecting on com1 to my computer linked at the hard firewall, i don't know the output /dev/sty...
The FreeBSD wait that the firewall give me it !
In MS windows langage is com1 but under BSD is /dev/sty, i forgot it ?

Step 1 : with ethernet link
Step 2 : with serial cable

How i can upload my firmware ?

Use the serial console to configure it. Most hardware firewalls have one. You can use cu(1) to "talk" to the device over the serial connection. I've also dealt with SOHO type firewalls that did a pre-set tftp(1) to fetch a firmware from a specific remote server IP. In general, TFTP is usually used to upload or download configurations and firmware. More modern, enterprise grade, hardware will also allow you to scp(1) it.

Uploading firmware or configurations via serial may also be possible but keep in mind that the serial console is usually only 9600 baud (around 900B/s) so uploading a 512K large firmware will take forever. Not recommended. Use the serial console to configure some basic networking, then use TFTP or SCP to upload a new firmware or configuration.

In any case, I suggest you find the manual for the device. I'm sure the proper process is documented.