Learn about Centmin Mod LEMP Stack today
Become a Member

rsync "Connection timed out" problem

Discussion in 'Centmin Mod Insights' started by rdan, Jun 1, 2014.

Tags:
  1. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    11:20 AM
    Mainline
    10.2
    Code:
    # rsync -avzhe 'ssh -p 1234' root@192.1.2.3:/home/nginx/domains/ /home/nginx/domains/
    ssh: connect to host 192.1.2.3 port 1234: Connection timed out
    rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
    rsync error: unexplained error (code 255) at io.c(600) [receiver=3.0.6]
    
    What could be the problem?
    Is it csf blocking this?

     
  2. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    192.1.2.3 a remote server or the server with Centmin Mod installed ?

    For security reasons, yes by default [HASHTAG]#CSF[/HASHTAG] firewall will block connections to root ssh unless the remote server is whitelisted as per CSF info at http://centminmod.com/csf_firewall.html

    If both remote and source servers are Centmin Mod based, then both instances of CSF need whitelisting as well.
     
  3. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    11:20 AM
    Mainline
    10.2
    The remote server.
     
  4. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    in that case in /etc/csf/csf.conf need to add to TCP_OUT comma separated list of ports port 1234 to allow it outbound connections

    then restart CSF firewall

    Code:
    csf -r
    moving this thread to Centmin Mod Insights forum so folks can understand this too
     
  5. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    11:20 AM
    Mainline
    10.2
    I white list both IP on both end, and it works now :)
     
  6. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Why I love CSF Firewall when properly configured for added security :)
     
  7. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    11:20 AM
    Mainline
    10.2
    I also Love rsync because I can transfer my forum very quick thru different servers :)
    Even though I got 5GB+ Forum files only.
     
  8. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    11:20 AM
    Mainline
    10.2
    Code:
    sent 4.53M bytes  received 4.48G bytes  10.56M bytes/sec
    total size is 5.42G  speedup is 1.21
    
     
  9. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah i use rsync through http://www.rsnapshot.org to automate backup pulls from a Backupsy KVM VPS server with 500GB storage space for US$7/month and they had a promo for 100% free credit for every dollar you deposited. So got US$125 free credit on top of my US$125 deposited = US$250 to use. Going to spin up more Backupsy KVM VPS servers in different locations eventually :D
     
  10. Matt

    Matt Well-Known Member

    925
    414
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +669
    Local Time:
    4:20 AM
    1.5.15
    MariaDB 10.2
    I also fully automate my backups using rsnapshot. Great programme. I don't use backupsy any more, as I'm putting my backups on the Kimsufi server.
     
  11. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah I'm using Backupsy to take advantage of their raid redundant storage as once you factor that into a dedicated server, the costs are much higher. But I guess with your Kimsufi server you could afford to setup more than one heh.
     
  12. Matt

    Matt Well-Known Member

    925
    414
    63
    May 25, 2014
    Rotherham, UK
    Ratings:
    +669
    Local Time:
    4:20 AM
    1.5.15
    MariaDB 10.2
    I don't even bother with that, I just rsync the most recent daily.0 backup to my NAS at home each night.
     
  13. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    I would love to do that too just restore speed for my ISP upload speed is too slow at ~150KB/s. 400GB of data would take ages to restore from my local pc :LOL:
     
  14. rdan

    rdan Well-Known Member

    5,439
    1,398
    113
    May 25, 2014
    Ratings:
    +2,187
    Local Time:
    11:20 AM
    Mainline
    10.2
    Same here :)
    I think Philippines Has the Most Expensive and Slowest Internet in the world (n)
     
  15. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Well I have the weirdest ISP Telstra Australia effective is ~112Mbps down and ~2.5Mbps up within Australia and outside i.e. USA around 2-8Mbps down and up half that speed.

    Ah should start an http://speedtest.net thread in off topic forums :D
     
  16. karistuck

    karistuck Member

    43
    2
    8
    Jun 1, 2014
    대한민국
    Ratings:
    +3
    Local Time:
    12:20 PM
    1.5.8
    When I was type 'csf -r' on vps.
    Appear some error message.

    I want rsync for move data. But I couldn't it
     
  17. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  18. karistuck

    karistuck Member

    43
    2
    8
    Jun 1, 2014
    대한민국
    Ratings:
    +3
    Local Time:
    12:20 PM
    1.5.8
    No, never edit.

    And My iptables rule

    /etc/csf/csf.deny file

     
  19. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    1:20 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    try update and restart
    Code:
    csf -u
    csf -r
    or disable FASTSTART in /etc/csf/csf.conf
    Code:
    FASTSTART = "0"
     
  20. karistuck

    karistuck Member

    43
    2
    8
    Jun 1, 2014
    대한민국
    Ratings:
    +3
    Local Time:
    12:20 PM
    1.5.8
    I have some happen. When I typ csf -r than close connection to ssh

    Than I can't connecto ssh with custom port number.

    lol

    Im look for clear this issue