{"id":354,"date":"2010-02-25T15:24:36","date_gmt":"2010-02-25T13:24:36","guid":{"rendered":"http:\/\/www.shukko.com\/x3\/?p=354"},"modified":"2010-02-25T15:24:36","modified_gmt":"2010-02-25T13:24:36","slug":"rinetd-harika-bir-olay-redirects-tcp-connections-from-one-ip-address-and-port-to-another","status":"publish","type":"post","link":"https:\/\/www.shukko.com\/x3\/2010\/02\/25\/rinetd-harika-bir-olay-redirects-tcp-connections-from-one-ip-address-and-port-to-another\/","title":{"rendered":"rinetd &#8211; harika bir olay &#8211; redirects TCP connections from one IP address and port to another"},"content":{"rendered":"<p>olay: acil olarak server , lokasyon ve ip degistirmek gerekti.<\/p>\n<p>durum: eski serverda calisan pek cok domain, web , mail var &#8211; aktarim kolay &#8211; ancak kisa surede yeni serverda yeni ipde devam etmek istiyoruz<\/p>\n<p>normal prosedur : eski serverdaki servisleri durdur. Yedek al &#8211; Yedekleri yeni servera aktar &#8211; yukle &#8211; calistigindan emin olunca nameserver iplerini degistir yeni server ipleri ile &#8211; bekle &#8211; 24 saat icinde hersey yoluna girer<\/p>\n<p>sorun: vakit dar &#8211; tum islemin 2 3 saat icinde olmasi gerek &#8211; ancak yedekleme tek basina 10 saat suruyor &#8211;<\/p>\n<p>10 saat yedekle &#8211; yedekleri aktar &#8211; 50GB \ud83d\ude42 &#8211; yukle &#8211; calistir et &#8211; 12 saat oldu . bizim 2 &#8211; 3 saatimiz var<\/p>\n<p>dnsler degisti ancak guncellenene kadar hersey eski iplerde resolve ediyor. basa bela durumu&#8230;<\/p>\n<p>cozum: rinetd !<\/p>\n<p>rinetd redirects TCP connections from one IP address and port to another, with basic IP-based access control.rinetd is a single-process server which handles any number of connections to the address\/port pairs specified in the file \/etc\/rinetd.conf. Since rinetd runs as a single process using nonblocking I\/O, it is able to redirect a large number of connections without a severe impact on the machine. This makes it practical to run services on machines inside an IP masquerading firewall.<\/p>\n<p>install rinetd in ubuntu<\/p>\n<p>apt-get install rinetd<\/p>\n<p>install rinetd in centos<\/p>\n<p>http:\/\/www.boutell.com\/rinetd\/<\/p>\n<p>wget http:\/\/www.boutell.com\/rinetd\/http\/rinetd.tar.gz<\/p>\n<p>tar zxvf rinetd.tar.gz , cd rinetd\u00a0 , make install<\/p>\n<p>config dosyasi yapisi cok kolay<\/p>\n<p>nano \/etc\/rinetd.conf<\/p>\n<p><code><br \/>\n#<br \/>\n# forwarding rules come here<br \/>\n#<br \/>\n# you may specify allow and deny rules after a specific forwarding rule<br \/>\n# to apply to only that forwarding rule<br \/>\n#<br \/>\n# bindadress bindport connectaddress connectport<\/code><\/p>\n<p># logging information<br \/>\nlogfile \/var\/log\/rinetd.log<\/p>\n<p># uncomment the following line if you want web-server style logfile format<br \/>\n# logcommon<\/p>\n<p><strong>rinetd example<\/strong><br \/>\nAssume that you have a machine with the IP address 192.168.2.1 which has been running Apache, and that you\u2019d like to move that to the IP address 192.168.2.3<\/p>\n<p>You\u2019ve already updated DNS to point visitors to the new IP address, but you want to ensure that people connecting to the old IP still continue to receive service.<\/p>\n<p>To handle this example you should update the \/etc\/rinetd.conf file to read:<\/p>\n<p># bindadress bindport connectaddress connectport<br \/>\n192.168.2.1 80 192.168.2.3 80<br \/>\n192.168.2.1 443 192.168.2.3 443<\/p>\n<p>Once you restart rinetd all incoming connections on port 80 and 443 will be seamlessly redirected from the old IP to the new one &#8211; although you will need to restart rinetd after making the change to your configuration file.<\/p>\n<p>sonre restart et inetd yi oldu bitti..<\/p>\n<p>sitesi burada<\/p>\n<p><a href=\"http:\/\/www.boutell.com\/rinetd\/\" target=\"_self\">http:\/\/www.boutell.com\/rinetd\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>olay: acil olarak server , lokasyon ve ip degistirmek gerekti. durum: eski serverda calisan pek cok domain, web , mail var &#8211; aktarim kolay &#8211; ancak kisa surede yeni serverda yeni ipde devam etmek istiyoruz normal prosedur : eski serverdaki servisleri durdur. Yedek al &#8211; Yedekleri yeni servera aktar &#8211; yukle &#8211; calistigindan emin olunca [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-354","post","type-post","status-publish","format-standard","hentry","category-kategerisiz"],"_links":{"self":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/comments?post=354"}],"version-history":[{"count":1,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/354\/revisions"}],"predecessor-version":[{"id":355,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/posts\/354\/revisions\/355"}],"wp:attachment":[{"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/media?parent=354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/categories?post=354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.shukko.com\/x3\/wp-json\/wp\/v2\/tags?post=354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}