Can't connect to friends server

Whenever my friend is playing Rust and I try to join his game it says that the server is not responding. When he tries to invite me to the game it doesn’t allow him to.

Is there any fix for this, or is there some other problem? I run this through Steam.

Try getting the ip number of the server your friend is in from him.

Start rust then use the F1 console and type

“client.connect -enter ip here-”