The problem you're describing is almost always related to network connection issues such as firewall / NAT / port forwarding. It's not a steam issue. Both local host and dedicated server use the same configuration.
Once you fix the above, and server is running, open up the l4d2 developer console and type
Code:
connect externalIP:port
If it doesnt connect, something is blocking the connection or there is no route to the server on that port. There are a lot of guides out there on how to configure port forwarding on your router for l4d2, or how to allow apps to be able to accept incoming connections. Check google.