Cant connect to new server on Linux CentOS 6

Discussion in 'Bukkit Help' started by 5tinger, Nov 19, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    5tinger

    I just finished setting up a dedicated server using CentOS 6. I successfully ran my craftbukkit in the terminal, but when when I try to connect to the server from another computer on my network, my client says it can't reach server. I think it might be some firewall blocking the port or something on CentOS. I'm very new to Linux so I'm stuck at this point. Anyone have any advice?
     
  2. Offline

    lastof

  3. Offline

    shadrxninga

  4. Offline

    5tinger

    Here's my SSH commands, however the client still says it can't reach the server. I set a static IP address, however when I check connection information it also lists a broadcast address. I'm not sure if that has means anything.

    [root@localhost ~]# iptables -A INPUT -p tcp --dport 25565 -j ACCEPT
    [root@localhost ~]# /etc/init.d/iptables save
    iptables: Saving firewall rules to /etc/sysconfig/iptables:[ OK ]
    [root@localhost ~]# /etc/init.d/iptables restart
    iptables: Flushing firewall rules: [ OK ]
    iptables: Setting chains to policy ACCEPT: filter [ OK ]
    iptables: Unloading modules: [ OK ]
    iptables: Applying firewall rules: [ OK ]
     
  5. Offline

    shadrxninga

    You probably need to open the udp port as well.

    I'm not too sure about this but running this should do it:
    iptables -A INPUT -p udp --dport 25565 -j ACCEPT

    So, look into it a bit more,

    My guess is that Both UDP and TCP need to be open for you to be able to connect. So find out how to open the UDP as well.
     
  6. Offline

    HotelErotica

    you could also just do "iptables --flush" to completely remove all rules for testing purposes, it sounds like the machine is already protected by a hardware router anyways.
     
  7. Offline

    5tinger

    I entered that, but I still can't connect. I can ping the server, but I cant ping the port. not sure if that means anything because I also can't ping port 22 despite being able to SSH to it. Is there a way to manually edit the firewall, or turn it off completely? at least to test.
     
  8. Offline

    HotelErotica

    "iptables --flush" or "/etc/init.d/iptables stop" should remove all rules, if your still not getting anything from the server, you mind posting the server log maybe its failing to bind?
     
  9. Offline

    5tinger

    OK! after flushing and stopping iptables I can connect to the server. What would you recommend doing next if anything?
     
  10. Offline

    lastof

    With iptables running, when you can't connect, what do you see if you do
    Code:
    iptables -L
    (that lists the current config).

    I suspect that it might be that you restarted iptables after adding the new rules, and that the default config it is loading isn't the one you saved.
     
  11. Offline

    HotelErotica

    Well if your server is in an internal network that is protected you can disable the firewall all togeather with "chkconfig iptables off" as it stands now if you restart the machine the firewall be enabled again, if you need a firewall i'd just look up a tutorial on how to open ports with iptables.
     
  12. Offline

    5tinger

Thread Status:
Not open for further replies.

Share This Page