Welcome to the Dash Forum!

Please sign up to discuss the most innovative cryptocurrency!

Mirrors of www.darkcoin.io on Masternodes?

Discussion in 'General Discussion' started by thelonecrouton, Jan 10, 2015.

  1. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    Since darkcoin.io has been getting DDOS'd, it seems we ought to be making use of all the excess bandwidth that MN owners are paying for, so if anyone knows of a simple way for MN ops to mirror darkcoin.io on their MN's, those that wish to can do so and a list of mirror IPs could be put in the BCT thread's OP?

    Would this be of use or more trouble that it's worth?

    Just seems like with nearly 2000 servers worldwide we ought to be a harder target to take down, if some scripted rsync trickery could be used...
     
    • Like Like x 7
  2. tungfa

    tungfa Administrator
    Dash Core Team Foundation Member Masternode Owner/Operator Moderator

    Joined:
    Apr 9, 2014
    Messages:
    8,964
    Likes Received:
    6,737
    Trophy Points:
    1,283
    Is that possible ?
    that would be great !
     
  3. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    It's certainly possible, it's just a question of the best way to go about it.

    It might also serve as a useful experiment for how any future 'Masternet' ideas might work.
     
    • Like Like x 3
  4. darkchild

    darkchild Member

    Joined:
    Sep 20, 2014
    Messages:
    76
    Likes Received:
    193
    Trophy Points:
    73
    Volunteers could either setup rsync to access the latest darkcoin.io content from the server or just pull the latest tar ball of the website from github like we do with the client updates and update their public_html folder.

    Since most of the masternodes are only running on port 9999, and 22, they can add port 80 to the firewall access list.

    eduffield or who ever controls the DNS could create the A records for each of the volunteering IP addresses like mirror1.darkcoin.io, mirror2.darkcoin.io, etc or just m1, m2..... mn

    It wouldn't hurt if these mirrors got an extra 5 DRK a month for the addition resource load and risk. We can't hide the A records from the attack as they can do an NSLookup, but it will be much harder and expensive to mount an attack on the entire network.

    A load balancer or something like UltraDNS Sitebacker by Neustar can also be used to then distribute the traffic to all the other masternodes since they have a pretty solid anti DDoS solution at the DNS level.

    Just my two cents.
     
    #4 darkchild, Jan 10, 2015
    Last edited by a moderator: Jan 10, 2015
    • Like Like x 4
  5. tungfa

    tungfa Administrator
    Dash Core Team Foundation Member Masternode Owner/Operator Moderator

    Joined:
    Apr 9, 2014
    Messages:
    8,964
    Likes Received:
    6,737
    Trophy Points:
    1,283
    fernando
    what do you think
    ;)
    Edit:
    i believe he is off in the countryside, we should hear from him by monday
     
    #5 tungfa, Jan 10, 2015
    Last edited by a moderator: Jan 10, 2015
  6. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    Presumably apache or some other webserver (would we need anything as heavyweight as apache?) would need to be installed on the MN.

    1. Install webserver
    2. Modify firewall to open port 80 (or any other port, I suppose the mirror link could include the port number: 123.456.23.56:676 ?)
    3. rsync/wget/htttrack content from wherever, with periodic automatic updating
    4. Unkillable darkcoin.io. :)
     
    • Like Like x 2
  7. darkchild

    darkchild Member

    Joined:
    Sep 20, 2014
    Messages:
    76
    Likes Received:
    193
    Trophy Points:
    73
    LiteSpeed or OpenLiteSpeed... The web server serves 10x more users on a fraction of the memory that Apache uses. It's a good choice for a server/VPS under stress or low on resources.

    There are others one could use like Nginx and Lighttpd
     
    • Like Like x 2
  8. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    If we can get together an idiots guide for both MN ops and content providers too, this could be a source of income for the Foundation - content provider pays Foundation for the service (approved Darkcoin related content only) and Foundation adds that site to the content pile that MN's mirror. Fee is split between Foundation and MN ops providing the service.

    Getting a bit ahead of myself here, just mentioning the potential. :)

    The contentpile could also be distributed as a torrent. Good luck DDOSing that.

    edit: Content could also be distributed via usenet. Those guys have more bandwidth than God.
     
    #8 thelonecrouton, Jan 10, 2015
    Last edited by a moderator: Jan 10, 2015
  9. tungfa

    tungfa Administrator
    Dash Core Team Foundation Member Masternode Owner/Operator Moderator

    Joined:
    Apr 9, 2014
    Messages:
    8,964
    Likes Received:
    6,737
    Trophy Points:
    1,283
    if you get flare and a couple of others together you should be all set already regarding Server quantity
     
  10. darkchild

    darkchild Member

    Joined:
    Sep 20, 2014
    Messages:
    76
    Likes Received:
    193
    Trophy Points:
    73
    This is something I've been playing with behind the scenes. I released a whitepaper for something like this back in January, 2014. No one likes being DDoSed. There are incredible applications for this. I shared the idea briefly with Evan during the recent virtual cryptocurrency expo in December.

    It's best to focus on the core issues and once darkcoin is really stable, we can begin to look at extensions/plugins. The good news is that thanks to the community and devs, Darkcoin is evolving at a really fast pace.
     
    • Like Like x 3
  11. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    So I had a go, in my amateur fashion:

    http://176.126.244.114:8088

    ...should give you a mirror of what I found at https://github.com/darkcoin/darkcoin.io, which I suspect is out of date, but it demonstrates the concept. :)

    Hopefully someone can confirm it works, and tell me where to get the latest website git copy?

    Here's the steps, I'm sure there's a dozen better ways but this isn't my day job:

    # log into your VPS and add a server user
    ssh [email protected]
    adduser server
    passwd server

    # you may or may not have to manually make a home directory for the new user
    mkdir /home/server
    chown server server

    # install dependencies
    apt-get update
    apt-get install build-essential
    apt-get install rcs libpcre3-dev libexpat1-dev libssl-dev libgeoip-dev zlib1g-dev libxml2 libxml2-dev libpng-dev openssl git

    # get openlightspeed and install it
    cd /home/server
    wget http://open.litespeedtech.com/packages/openlitespeed-1.3.6.tgz
    tar xfvz openlitespeed-1.3.6.tgz
    cd openlitespeed-1.3.6
    make && make install

    # modify your firewall to allow access to ports 8088 and 7080
    ufw allow 8088/tcp
    ufw allow 7080/tcp

    #start openlightspeed server
    /usr/local/lsws/bin/lswsctrl start

    # from your browser, check it is running - point your browser at 1.2.3.4:8088

    # from your browser, change the default admin password
    - got to https://1.2.3.4:7080
    - log in as admin, user admin password 123456
    - click on webadmin console thingy (bottom left)
    - click on webadmin console security tab
    - click on admin user (bottom left) and change password

    # back at the terminal, change to default server directory
    cd /usr/local/lsws/DEFAULT/html
    mv index.html backupindex.html

    # get copy of darkcoin.io website and copy it out into cwd (obviously I can't wget -m it as it's down right now)
    git clone https://github.com/darkcoin/darkcoin.io
    cp -R darkcoin.io/* .
     
    #11 thelonecrouton, Jan 10, 2015
    Last edited by a moderator: Jan 11, 2015
    • Like Like x 4
  12. Morritt

    Morritt New Member

    Joined:
    Jan 2, 2015
    Messages:
    12
    Likes Received:
    7
    Trophy Points:
    3
    Is it worth doing this? Personally I don't have a problem with cloning the site and hosting it on my server, but I think there are search engine ranking implications (bad) for copy/pasting sites. Generally exact duplicates of a site are considered a bad thing and penalised.
     
  13. darkchild

    darkchild Member

    Joined:
    Sep 20, 2014
    Messages:
    76
    Likes Received:
    193
    Trophy Points:
    73
    I think there are meta tags and robots.txt entries that could be introduced to prevent any penalties from the search engine for the mirror sites only. This way the primary site retains it's rankings.
     
  14. crowning

    crowning Well-known Member

    Joined:
    May 29, 2014
    Messages:
    1,428
    Likes Received:
    2,005
    Trophy Points:
    183
    Actually I wouldn't run a HTTP-server on one of my Masternodes because I wouldn't want to check the security-mailing-lists for new vulnerabilities each day.
    No problem running it on one of my 'normal' servers.
     
    • Like Like x 2
  15. Miner237

    Miner237 Well-known Member
    Foundation Member

    Joined:
    May 28, 2014
    Messages:
    510
    Likes Received:
    223
    Trophy Points:
    213
    I'd be happy to host a mirror site on a standalone web server.
     
    • Like Like x 3
  16. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    There's nothing on any of my servers that can't be replaced within a few minutes.
     
  17. tungfa

    tungfa Administrator
    Dash Core Team Foundation Member Masternode Owner/Operator Moderator

    Joined:
    Apr 9, 2014
    Messages:
    8,964
    Likes Received:
    6,737
    Trophy Points:
    1,283
    good effort crouton !
    i hope evan and fernando check this out and give an opinion
    (i am happy to have my MN's involved too)
     
  18. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    http://176.126.244.114:8088/

    - updated what I could of current live version using good old fashioned wget. Missing a few images but mostly all there. Would be easier with access to the git repo.
     
    • Like Like x 1
  19. stan.distortion

    stan.distortion Active Member

    Joined:
    Oct 30, 2014
    Messages:
    840
    Likes Received:
    492
    Trophy Points:
    133
    Would it be possible to do this in conjunction with a distributed storage system? I'm thinking something like a link to a most-recent version, many other systems could be built a system to link to stored data and data storage could be incentivised directly.
     
    #19 stan.distortion, Jan 11, 2015
    Last edited by a moderator: Jan 11, 2015
    • Like Like x 2
  20. elgringo

    elgringo Member

    Joined:
    Sep 23, 2014
    Messages:
    90
    Likes Received:
    87
    Trophy Points:
    78
    • Like Like x 5
  21. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    Yep. you could get fancy with it but a simple torrent signed by the Foundation that a daemon on each MN watched for, grabbed+updated local content, and seeded would work pretty well. Someone who knew what they were doing could set this up overnight. I am muddling along as usual... :)
     
  22. thelonecrouton

    thelonecrouton Well-known Member
    Foundation Member

    Joined:
    Apr 15, 2014
    Messages:
    1,135
    Likes Received:
    813
    Trophy Points:
    283
    • Like Like x 1
  23. stan.distortion

    stan.distortion Active Member

    Joined:
    Oct 30, 2014
    Messages:
    840
    Likes Received:
    492
    Trophy Points:
    133
    That sounds spot on :) DDoS should be practically impossible with incentivised storage, global storage requirements become an open market, duplication becomes quantifiable and is minimised and hardened (even OSs including updates), encrypted content, etc. etc. Darkcoin in the middle of that lot sounds nice and it could be got going with a torrent of a HTML file and an update mechanism :)
     
    • Like Like x 1
  24. stan.distortion

    stan.distortion Active Member

    Joined:
    Oct 30, 2014
    Messages:
    840
    Likes Received:
    492
    Trophy Points:
    133
    Had a look on Bittorrents blog at some of the projects, some great stuff there but they badly need to integrate with crypos and not just for a frictionless value transfer system, maelstrom's in need of a DNS type system too. Any thoughts on approaching them or if they're already talking to someone in the crypto space? Getting incentivised storage and a paymets layer in the foundations could be a huge step forward and they're looking for content providers for maelstrom's alpha testing.
     
    • Like Like x 1