0

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 192.168.1.100 (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 127.0.1.1:27015         0.0.0.0:*               OUÇA      
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               OUÇA      
tcp        0      0 127.0.1.1:53            0.0.0.0:*               OUÇA      
tcp        0      0 127.0.0.1:631           0.0.0.0:*               OUÇA      
tcp6       0      0 :::80                   :::*                    OUÇA      
tcp6       0      0 ::1:631                 :::*                    OUÇA      
udp        0      0 0.0.0.0:27015           0.0.0.0:*                          
udp        0      0 0.0.0.0:27020           0.0.0.0:*                          
udp        0      0 0.0.0.0:36710           0.0.0.0:*                          
udp        0      0 127.0.1.1:53            0.0.0.0:*                          
udp        0      0 0.0.0.0:631             0.0.0.0:*                          
udp        0      0 0.0.0.0:49971           0.0.0.0:*                          
udp        0      0 0.0.0.0:5353            0.0.0.0:*                          
udp        0      0 0.0.0.0:5353            0.0.0.0:*                          
udp        0      0 0.0.0.0:26901           0.0.0.0:*                          
udp        0      0 0.0.0.0:27005           0.0.0.0:*                          
udp6       0      0 :::5353                 :::*                               
udp6       0      0 :::34125                :::*                             

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

Starting Nmap 6.40 ( http://nmap.org ) at 2014-05-28 20:22 BRT
Nmap scan report for 192.168.1.100
Host is up.
PORT      STATE         SERVICE
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).
PORT      STATE  SERVICE
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 (127.0.1.1) instead my LAN IP (192.168.1.100). 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
0

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.