And it worked but only play games or LAN games LAN, and what I need is to know how to create a dedicated server on the Internet, that is always online someone could help me?
As jaydolan said. This usually involved these steps:
1) Set a fixed local IP for your server machine (via the router or your box)
2) Forward the port on the router to the server IP.
3) Configure your firewall to allow incoming connections.
This applies to any server you want to run, not just q2w (the only specific thing is the port number, 1998). You should google 'Port forwarding' if you need more information on or help with the subject.