I just install a Counter-Strike: Source Dedicated Server on my Ubuntu 14.04 Desktop amd64 and I'm having trouble to allow incoming access to this server from the internet.

I did a port forwarding on my router to make (LAN Addr) handle incoming connections on port 27015 over TCP and UDP.

Sadly, when I try to establish a remote connection on this port I'm getting a message of 'Connection refused'.

I did the exact same procedure on Windows 7 with Windows Firewall disabled and I have succeeded.

I also tried to disable ufw and make some rules on iptables but nothing working so far.

Some results of my network access tests...

nunesvictor@nunesvictor-not:~$ netstat -ln
Conexões Internet Ativas (somente servidores)
Proto Recv-Q Send-Q Endereço Local          Endereço Remoto         Estado      
tcp        0      0*               OUÇA      
tcp        0      0*               OUÇA      
tcp        0      0  *               OUÇA      
tcp        0      0 *               OUÇA      
tcp6       0      0 :::80                   :::*                    OUÇA      
tcp6       0      0 ::1:631                 :::*                    OUÇA      
udp        0      0 *                          
udp        0      0 *                          
udp        0      0 *                          
udp        0      0  *                          
udp        0      0   *                          
udp        0      0 *                          
udp        0      0  *                          
udp        0      0  *                          
udp        0      0 *                          
udp        0      0 *                          
udp6       0      0 :::5353                 :::*                               
udp6       0      0 :::34125                :::*                             

nunesvictor@nunesvictor-not:~$ sudo nmap -p 27015 -sU

Starting Nmap 6.40 ( http://nmap.org ) at 2014-05-28 20:22 BRT
Nmap scan report for
Host is up.
27015/udp open|filtered halflife

Nmap done: 1 IP address (1 host up) scanned in 2.15 seconds

nunesvictor@nunesvictor-not:~$ sudo nmap -p 27015 -sU [MY REAL IP ADDRESS]

Starting Nmap 6.40 ( http://nmap.org ) at 2014-05-28 20:23 BRT
Nmap scan report for [MY REAL IP ADDRESS]
Host is up (0.0033s latency).
27015/udp closed halflife

Nmap done: 1 IP address (1 host up) scanned in 1.83 seconds

So, what's going on with this thing?!

  • After a (long) time on google seaching for problems like mine I found the problem and my answer. My SRCDS server was running over my loopback IP ( instead my LAN IP ( That way, my router port forwarding was useless because the service was not running on the correct IP address, but I have to say, I always tought loopback and local ip address worked as one, tough. Anyway, that was the problem and the solution was change the server configurations to force it to use the LAN IP instead the loopback. I hope this help someone anyway. Thanks. – nunesvictor May 29 '14 at 2:15

sudo service iptables stop

My understanding is that this won't actually stop the ufw service, but will set the chains to policy ACCEPT, and won't block any incoming traffic.

It probably isn't a good long term solution unless your router is appropriately secure, but it will allow you to test whether the firewall rules are what is causing the problem - which given your testing with another machine they almost certainly are.

  • 1
    I'm afraid that does not solve my problem... iptables is not even a service on Ubuntu 14.04. That command line just does not work. – nunesvictor May 29 '14 at 1:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.