Dart, your description makes it sound like, after the server reboots, things stop working. But then, you say, you get it working again until the server reboots again.

This implies that there is something, in between the time the server is rebooted, and the time it starts working again, that you are doing something to make it work.

What is that thing you are doing?

You say "every time I open the ports"... but opening ports is a permanent setting, so that can't be it.

Is it this?:

When you go into the configuration panel of some routers, saving the configuration requires that the router be rebooted. Is that what you're doing to make things work? If the server reboots so must the router be?
_________________________
Tony Fabris