Steam connection failing when playing Garry's Mod.

Hey, everyone!

Recently I’ve been having a problem playing GMod on Steam with some friends. Most of the time, when I create a server, my Steam connection fails and my friends cannot connect. I also get a message on any chat with friends. Soon after, the connection comes back online, but apparently the game tells my friends that I’m “not currently playing in a server” and refuses to let them connect.
Sometimes, they manage to connect, but we can only play for a short time before the connection suddenly goes offline (Steam connection only) and they cannot join again.
I can give more details if needed. Thank you!