I get this error too and it seems a lot of other people get it too (it's possible everyone has this issue). Whenever I check, Steam immedietly downloads something (640 bytes for me) and then claims everything is OK. It doesn't seem to cause any issues for me though.
I think your issue has to do with how you connect to the Internet. It's very common that people connects through a router that shares a single IPv4 address among all connected devices (whether they use WiFi or wired connection). The router uses a technique called NAT, and this causes issues when you try to run a server or host an online game.
To get around this, you need to do something called "port forwarding". You have to change some settings in the router and it's somewhat technical and often not straightforward. You also need to make sure your pc doesn't change it's address on the local network (I prefer using the DHCP service for that rather than setting the pc to use a static ip).
There are guides all over the web on how to do this if you google a little. One such place is PortForward, but there are a lot of others. Many have guides for specific router models that you can follow. Many of these places do try to sell you some software to help you, but you don't really need that.
An even simpler method is to enable an option in the router called UPnP. It's a service that locally connected devices can use to set up port forwarding automatically on a temporary basis. Steam and TerrariaServer supports this, and I generally recommend console players to use it as well because of it's ease of use. Basically if you enable it, you don't have to worry about it again.
Some do consider it a security risk, but that will only be an issue if you get virus/malware on one of your locally connected devices. You have bigger issues than worrying about UPnP then.