{"id":444,"date":"2012-10-19T19:43:46","date_gmt":"2012-10-19T17:43:46","guid":{"rendered":"http:\/\/antynet.pl\/?p=444"},"modified":"2012-10-19T19:43:46","modified_gmt":"2012-10-19T17:43:46","slug":"serwer-linux-i-wiecej-jak-jeden-gateway","status":"publish","type":"post","link":"https:\/\/www.antynet.pl\/index.php\/2012\/10\/19\/serwer-linux-i-wiecej-jak-jeden-gateway\/","title":{"rendered":"Serwer Linux i wi\u0119cej jak jeden gateway."},"content":{"rendered":"<p style=\"margin-bottom: 0cm;\">Posiadaj\u0105c serwer ( nie router dla klient\u00f3w ), kt\u00f3ry posiada mo\u017cliwo\u015b\u0107 korzystania z wi\u0119cej jak jednego IP od r\u00f3\u017cnych dostawc\u00f3w natykamy si\u0119 na problem, i\u017c przy standardowej konfiguracji \u015bwiat widzi serwer tylko po IP z ustawionym gateway w \/etc\/networking\/ .<\/p>\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">Podobnie jak w przypadku routera z wieloma dostawcami z pomoc\u0105 przychodzi iproute. Jednak\u017ce w tym przypadku znakowanie pakiet\u00f3w nie jest wykorzystywane .. bo nie zadzia\u0142a. Czemu to pewnie wiecie.<\/p>\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">Poni\u017cej dzia\u0142aj\u0105ca rzeczywista konfiguracja jednej z moich maszyn, ten serwer to DNS posiadaj\u0105cy \u0142\u0105cza do debacom.pl oraz polsl.pl .<\/p>\n<p style=\"margin-bottom: 0cm;\">\n<blockquote>\n<p style=\"margin-bottom: 0cm;\">cat \/etc\/iproute2\/rt_tables<\/p>\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">#<\/p>\n<p style=\"margin-bottom: 0cm;\"># reserved values<\/p>\n<p style=\"margin-bottom: 0cm;\">#<\/p>\n<p style=\"margin-bottom: 0cm;\">255     local<\/p>\n<p style=\"margin-bottom: 0cm;\">254     main<\/p>\n<p style=\"margin-bottom: 0cm;\">253     default<\/p>\n<p style=\"margin-bottom: 0cm;\">0       unspec<\/p>\n<p style=\"margin-bottom: 0cm;\">#<\/p>\n<p style=\"margin-bottom: 0cm;\"># local<\/p>\n<p style=\"margin-bottom: 0cm;\">#<\/p>\n<p style=\"margin-bottom: 0cm;\">#1      inr.ruhep<\/p>\n<p style=\"margin-bottom: 0cm;\">200 t1<\/p>\n<p style=\"margin-bottom: 0cm;\">201 t2<\/p>\n<\/blockquote>\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">\n<blockquote>\n<p style=\"margin-bottom: 0cm;\">cat routing<\/p>\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">#!\/bin\/bash<\/p>\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">ip route add 213.227.125.0 dev eth0 src 213.227.125.129 table t1<\/p>\n<p style=\"margin-bottom: 0cm;\">ip route add 178.212.43.0 dev eth1 src 178.212.43.101 table t2<\/p>\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">ip route add default via 213.227.125.254 table t1<\/p>\n<p style=\"margin-bottom: 0cm;\">ip route add default via 178.212.43.97 table t2<\/p>\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">ip route add 213.227.125.0 dev eth0 src 213.227.125.254<\/p>\n<p style=\"margin-bottom: 0cm;\">ip route add 178.212.43.0 dev eth1 src 178.212.43.97<\/p>\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">ip route add default via 213.227.125.254<\/p>\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">ip rule add from 213.227.125.129 table t1<\/p>\n<p style=\"margin-bottom: 0cm;\">ip rule add from 178.212.43.101 table t2<\/p>\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">ip route add 127.0.0.0\/8 dev lo table t1<\/p>\n<p style=\"margin-bottom: 0cm;\">ip route add 127.0.0.0\/8 dev lo table t2<\/p>\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">ip route add 213.227.125.0 dev eth0 table t2<\/p>\n<p style=\"margin-bottom: 0cm;\">ip route add 178.212.43.0 dev eth1 table t1<\/p>\n<\/blockquote>\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">\n<p style=\"margin-bottom: 0cm;\">powodzonka!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Posiadaj\u0105c serwer ( nie router dla klient\u00f3w ), kt\u00f3ry posiada mo\u017cliwo\u015b\u0107 korzystania z wi\u0119cej jak jednego IP od r\u00f3\u017cnych dostawc\u00f3w natykamy si\u0119 na problem, i\u017c przy standardowej konfiguracji \u015bwiat widzi serwer tylko po IP z ustawionym gateway w \/etc\/networking\/ . Podobnie jak w przypadku routera z wieloma dostawcami z pomoc\u0105 przychodzi iproute. Jednak\u017ce w tym [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[4],"tags":[],"class_list":["post-444","post","type-post","status-publish","format-standard","hentry","category-sciaga-admina"],"_links":{"self":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts\/444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/comments?post=444"}],"version-history":[{"count":2,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts\/444\/revisions"}],"predecessor-version":[{"id":446,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/posts\/444\/revisions\/446"}],"wp:attachment":[{"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/media?parent=444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/categories?post=444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.antynet.pl\/index.php\/wp-json\/wp\/v2\/tags?post=444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}