내 /etc/hosts가 효과가 없습니다.

내 /etc/hosts가 효과가 없습니다.

/etc/hosts저는 이러한 사이트로 나가는 트래픽을 차단하기 위해 여러 도메인을 추가했습니다 . 그러나 지금은 내 것이 /etc/hosts작동하지 않는다는 것을 알았습니다 . 이는 원시 송신 방화벽 역할을 하도록 설계되었습니다.

왜 이것이 전혀 효과가 없는지 아는 사람이 있습니까?

127.0.0.1   a.ns.facebook.com
127.0.0.1   b.ns.facebook.com
127.0.0.1   c.ns.facebook.com 
127.0.0.1   d.ns.facebook.com
127.0.0.1   doubleclick.net
127.0.0.1   edge-star-mini-shv-01-any2.facebook.com
127.0.0.1   edge-star-mini-shv-01-atl3.facebook.com
127.0.0.1   securepubads.g.doubleclick.net
127.0.0.1   twitter.com
127.0.0.1   twimg.com
127.0.0.1   abs.twimg.com
127.0.0.1   pbs.twimg.com
127.0.0.1   apps.facebook.com
127.0.0.1   connect.facebook.net
127.0.0.1   facebook.com
127.0.0.1   fbcdn.com
127.0.0.1   fbsbx.com
127.0.0.1   fbcdn.net
127.0.0.1   graph.facebook.com
127.0.0.1   login.facebook.com
127.0.0.1   s-static.ak.facebook.com
127.0.0.1   static.ak.connect.facebook.com
127.0.0.1   static.ak.fbcdn.net
127.0.0.1   www.connect.facebook.net
127.0.0.1   www.facebook.com
127.0.0.1   www.fbcdn.com
127.0.0.1   www.fbcdn.net
127.0.0.1   www.graph.facebook.com
127.0.0.1   www.login.facebook.com
127.0.0.1   www.s-static.ak.facebook.com
127.0.0.1   www.static.ak.connect.facebook.com
127.0.0.1   www.static.ak.fbcdn.net
127.0.0.1   0-edge-chat.facebook.com
127.0.0.1   1-edge-chat.facebook.com
127.0.0.1   2-edge-chat.facebook.com
127.0.0.1   3-edge-chat.facebook.com
127.0.0.1   4-edge-chat.facebook.com
127.0.0.1   5-edge-chat.facebook.com
127.0.0.1   6-edge-chat.facebook.com
127.0.0.1   alpha-shv-03-ash5.facebook.com
127.0.0.1   alpha-shv-03-atn1.facebook.com
127.0.0.1   alpha-shv-03-lla1.facebook.com
127.0.0.1   alpha-shv-04-prn2.facebook.com
127.0.0.1   alpha-shv-09-frc1.facebook.com
127.0.0.1   alpha.vvv.facebook.com
127.0.0.1   a.ns.facebook.com
127.0.0.1   api.facebook.com
127.0.0.1   atlasalpha-shv-09-frc3.facebook.com
127.0.0.1   atlas.c10r.facebook.com
127.0.0.1   atlasinyour-shv-05-ash3.facebook.com
127.0.0.1   atlas-shv-01-prn2.facebook.com
127.0.0.1   atlas-shv-04-lla1.facebook.com
127.0.0.1   atlas-shv-05-ash3.facebook.com
127.0.0.1   atlas-shv-06-ash2.facebook.com
127.0.0.1   atlas-shv-06-frc1.facebook.com
127.0.0.1   atlas-shv-07-lla1.facebook.com
127.0.0.1   atlas-shv-09-frc3.facebook.com
127.0.0.1   atlas-shv-13-prn1.facebook.com
127.0.0.1   atlas-www-shv-04-prn2.facebook.com
127.0.0.1   atlas-www-shv-07-ash4.facebook.com
127.0.0.1   atlas-www-shv-09-frc1.facebook.com
127.0.0.1   aura-11-01-snc7.facebook.com
127.0.0.1   badge.facebook.com
127.0.0.1   b-api.facebook.com
127.0.0.1   beta-chat-01-05-ash3.facebook.com
127.0.0.1   betanet-shv-03-atn1.facebook.com
127.0.0.1   betanet-shv-03-lla1.facebook.com
127.0.0.1   betanet-shv-04-prn2.facebook.com
127.0.0.1   betanet-shv-09-frc1.facebook.com
127.0.0.1   beta-shv-03-atn1.facebook.com
127.0.0.1   beta-shv-03-lla1.facebook.com
127.0.0.1   beta-shv-04-prn2.facebook.com
127.0.0.1   beta-shv-09-frc1.facebook.com
127.0.0.1   beta.vvv.facebook.com
127.0.0.1   b-graph.facebook.com
127.0.0.1   bidder-shv-05-frc3.facebook.com
127.0.0.1   bidder-shv-10-frc1.facebook.com
127.0.0.1   b.ns.facebook.com
127.0.0.1   channel-proxy-shv-04-frc3.facebook.com
127.0.0.1   channel-proxy-shv-06-ash2.facebook.com
127.0.0.1   channel-proxy-shv-07-ash2.facebook.com
127.0.0.1   channel-proxy-shv-13-prn1.facebook.com
127.0.0.1   channel-proxy-test-shv-07-ash2.facebook.com
127.0.0.1   code.facebook.com
127.0.0.1   connect.facebook.com
127.0.0.1   dev.vvv.facebook.com
127.0.0.1   d.vvv.facebook.com
127.0.0.1   edge-atlas-proxyprotocol-shv-01-ash5.facebook.com
127.0.0.1   edge-atlas-proxyprotocol-shv-03-ash5.facebook.com
127.0.0.1   edge-atlas-proxyprotocol-shv-07-ash4.facebook.com
127.0.0.1   edge-atlas-proxyprotocol-shv-07-frc3.facebook.com
127.0.0.1   edge-atlas-proxyprotocol-shv-09-frc1.facebook.com
127.0.0.1   edge-atlas-proxyprotocol-shv-12-frc1.facebook.com
127.0.0.1   edge-atlas-proxyprotocol-shv-12-frc3.facebook.com
127.0.0.1   edge-atlas-proxyprotocol-shv-13-frc1.facebook.com
127.0.0.1   edge-atlas-shv-01-ams2.facebook.com
127.0.0.1   edge-atlas-shv-01-ams3.facebook.com
127.0.0.1   edge-atlas-shv-01-ash5.facebook.com
127.0.0.1   edge-atlas-shv-01-atl1.facebook.com
127.0.0.1   edge-atlas-shv-01-bru2.facebook.com
127.0.0.1   edge-atlas-shv-01-cai1.facebook.com
127.0.0.1   edge-atlas-shv-01-cdg2.facebook.com
127.0.0.1   edge-atlas-shv-01-dfw1.facebook.com
127.0.0.1   edge-atlas-shv-01-fra3.facebook.com
127.0.0.1   edge-atlas-shv-01-gru1.facebook.com
127.0.0.1   edge-atlas-shv-01-hkg2.facebook.com
127.0.0.1   edge-atlas-shv-01-iad3.facebook.com
127.0.0.1   edge-atlas-shv-01-kul1.facebook.com
127.0.0.1   edge-atlas-shv-01-lax1.facebook.com
127.0.0.1   edge-atlas-shv-01-lga1.facebook.com
127.0.0.1   edge-atlas-shv-01-lhr3.facebook.com
127.0.0.1   edge-atlas-shv-01-mad1.facebook.com
127.0.0.1   edge-atlas-shv-01-mia1.facebook.com
127.0.0.1   edge-atlas-shv-01-mxp1.facebook.com
127.0.0.1   edge-atlas-shv-01-nrt1.facebook.com
127.0.0.1   edge-atlas-shv-01-ord1.facebook.com
127.0.0.1   edge-atlas-shv-01-sea1.facebook.com
127.0.0.1   edge-atlas-shv-01-sin1.facebook.com
127.0.0.1   edge-atlas-shv-01-sjc2.facebook.com
127.0.0.1   edge-atlas-shv-01-syd1.facebook.com
127.0.0.1   edge-atlas-shv-01-vie1.facebook.com
127.0.0.1   edge-atlas-shv-02-cai1.facebook.com
127.0.0.1   edge-atlas-shv-02-hkg2.facebook.com
127.0.0.1   edge-atlas-shv-03-ash5.facebook.com
127.0.0.1   edge-atlas-shv-03-atn1.facebook.com
127.0.0.1   edge-atlas-shv-03-hkg1.facebook.com
127.0.0.1   edge-atlas-shv-03-lla1.facebook.com
127.0.0.1   edge-atlas-shv-03-prn2.facebook.com
127.0.0.1   edge-atlas-shv-03-xdc1.facebook.com
127.0.0.1   edge-atlas-shv-04-hkg1.facebook.com
127.0.0.1   edge-atlas-shv-04-prn2.facebook.com
127.0.0.1   edge-atlas-shv-06-atn1.facebook.com
127.0.0.1   edge-atlas-shv-06-lla1.facebook.com
127.0.0.1   edge-atlas-shv-07-ash4.facebook.com
127.0.0.1   edge-atlas-shv-09-frc1.facebook.com
127.0.0.1   edge-atlas-shv-09-lla1.facebook.com
127.0.0.1   edge-atlas-shv-12-frc1.facebook.com
127.0.0.1   edge-atlas-shv-12-frc3.facebook.com
127.0.0.1   edge-atlas-shv-12-lla1.facebook.com
127.0.0.1   edge-atlas-shv-12-prn1.facebook.com
127.0.0.1   edge-atlas-shv-13-frc1.facebook.com
127.0.0.1   edge-atlas-shv-17-prn1.facebook.com
127.0.0.1   edge-atlas-shv-18-prn1.facebook.com
127.0.0.1   edge-chat.facebook.com
127.0.0.1   edge-liverail-shv-01-ams2.facebook.com
127.0.0.1   edge-liverail-shv-01-ams3.facebook.com
127.0.0.1   edge-liverail-shv-01-ash5.facebook.com
127.0.0.1   edge-liverail-shv-01-atl1.facebook.com
127.0.0.1   edge-liverail-shv-01-bru2.facebook.com
127.0.0.1   edge-liverail-shv-01-cai1.facebook.com
127.0.0.1   edge-liverail-shv-01-cdg2.facebook.com
127.0.0.1   edge-liverail-shv-01-dfw1.facebook.com
127.0.0.1   edge-liverail-shv-01-fra3.facebook.com
127.0.0.1   edge-liverail-shv-01-gru1.facebook.com
127.0.0.1   edge-liverail-shv-01-hkg2.facebook.com
127.0.0.1   edge-liverail-shv-01-iad3.facebook.com
127.0.0.1   edge-liverail-shv-01-kul1.facebook.com
127.0.0.1   edge-liverail-shv-01-lax1.facebook.com
127.0.0.1   edge-liverail-shv-01-lga1.facebook.com
127.0.0.1   edge-liverail-shv-01-lhr3.facebook.com
127.0.0.1   edge-liverail-shv-01-mad1.facebook.com
127.0.0.1   edge-liverail-shv-01-mia1.facebook.com
127.0.0.1   edge-liverail-shv-01-mxp1.facebook.com
127.0.0.1   edge-liverail-shv-01-nrt1.facebook.com
127.0.0.1   edge-liverail-shv-01-ord1.facebook.com
127.0.0.1   edge-liverail-shv-01-sea1.facebook.com
127.0.0.1   edge-liverail-shv-01-sin1.facebook.com
127.0.0.1   edge-liverail-shv-01-sjc2.facebook.com
127.0.0.1   edge-liverail-shv-01-syd1.facebook.com
127.0.0.1   edge-liverail-shv-01-tpe1.facebook.com
127.0.0.1   edge-liverail-shv-01-vie1.facebook.com
127.0.0.1   edge-liverail-shv-02-cai1.facebook.com
127.0.0.1   edge-liverail-shv-02-hkg2.facebook.com
127.0.0.1   edge-liverail-shv-03-ash5.facebook.com
127.0.0.1   edge-liverail-shv-03-atn1.facebook.com
127.0.0.1   edge-liverail-shv-03-hkg1.facebook.com
127.0.0.1   edge-liverail-shv-03-lla1.facebook.com
127.0.0.1   edge-liverail-shv-03-prn2.facebook.com
127.0.0.1   edge-liverail-shv-03-xdc1.facebook.com
127.0.0.1   edge-liverail-shv-04-hkg1.facebook.com
127.0.0.1   edge-liverail-shv-04-prn2.facebook.com
127.0.0.1   edge-liverail-shv-06-atn1.facebook.com
127.0.0.1   edge-liverail-shv-06-lla1.facebook.com
127.0.0.1   edge-liverail-shv-07-ash4.facebook.com
127.0.0.1   edge-liverail-shv-07-frc3.facebook.com
127.0.0.1   edge-liverail-shv-09-frc1.facebook.com
127.0.0.1   edge-liverail-shv-09-lla1.facebook.com
127.0.0.1   edge-liverail-shv-12-frc1.facebook.com
127.0.0.1   edge-liverail-shv-12-frc3.facebook.com
127.0.0.1   edge-liverail-shv-12-lla1.facebook.com
127.0.0.1   edge-liverail-shv-12-prn1.facebook.com
127.0.0.1   edge-liverail-shv-13-frc1.facebook.com
127.0.0.1   edge-liverail-shv-17-prn1.facebook.com
127.0.0.1   edge-liverail-shv-18-prn1.facebook.com
127.0.0.1   edge-mqtt.facebook.com
127.0.0.1   edge-mqtt-shv-01-ams2.facebook.com
127.0.0.1   edge-mqtt-shv-01-ams3.facebook.com
127.0.0.1   edge-mqtt-shv-01-ash5.facebook.com
127.0.0.1   edge-mqtt-shv-01-atl1.facebook.com
127.0.0.1   edge-mqtt-shv-01-bru2.facebook.com
127.0.0.1   edge-mqtt-shv-01-cai1.facebook.com
127.0.0.1   edge-mqtt-shv-01-cdg2.facebook.com
127.0.0.1   edge-mqtt-shv-01-dfw1.facebook.com
127.0.0.1   edge-mqtt-shv-01-fra3.facebook.com
127.0.0.1   edge-mqtt-shv-01-gru1.facebook.com
127.0.0.1   edge-mqtt-shv-01-hkg2.facebook.com
127.0.0.1   edge-mqtt-shv-01-iad3.facebook.com
127.0.0.1   edge-mqtt-shv-01-kul1.facebook.com
127.0.0.1   edge-mqtt-shv-01-lax1.facebook.com
127.0.0.1   edge-mqtt-shv-01-lga1.facebook.com
127.0.0.1   edge-mqtt-shv-01-lhr3.facebook.com
127.0.0.1   edge-mqtt-shv-01-mad1.facebook.com
127.0.0.1   edge-mqtt-shv-01-mia1.facebook.com
127.0.0.1   edge-mqtt-shv-01-mxp1.facebook.com
127.0.0.1   edge-mqtt-shv-01-nrt1.facebook.com
127.0.0.1   edge-mqtt-shv-01-ord1.facebook.com
127.0.0.1   edge-mqtt-shv-01-sea1.facebook.com
127.0.0.1   edge-mqtt-shv-01-sin1.facebook.com
127.0.0.1   edge-mqtt-shv-01-sjc2.facebook.com
127.0.0.1   edge-mqtt-shv-01-syd1.facebook.com
127.0.0.1   edge-mqtt-shv-01-tpe1.facebook.com
127.0.0.1   edge-mqtt-shv-01-vie1.facebook.com
127.0.0.1   edge-mqtt-shv-02-cai1.facebook.com
127.0.0.1   edge-mqtt-shv-02-hkg2.facebook.com
127.0.0.1   edge-mqtt-shv-03-ash5.facebook.com
127.0.0.1   edge-mqtt-shv-03-atn1.facebook.com
127.0.0.1   edge-mqtt-shv-03-hkg1.facebook.com
127.0.0.1   edge-mqtt-shv-03-lla1.facebook.com
127.0.0.1   edge-mqtt-shv-03-prn2.facebook.com
127.0.0.1   edge-mqtt-shv-03-xdc1.facebook.com
127.0.0.1   edge-mqtt-shv-04-hkg1.facebook.com
127.0.0.1   edge-mqtt-shv-04-prn2.facebook.com
127.0.0.1   edge-mqtt-shv-06-atn1.facebook.com
127.0.0.1   edge-mqtt-shv-06-lla1.facebook.com
127.0.0.1   edge-mqtt-shv-07-ash4.facebook.com
127.0.0.1   edge-mqtt-shv-07-frc3.facebook.com
127.0.0.1   edge-mqtt-shv-09-lla1.facebook.com
127.0.0.1   edge-mqtt-shv-12-frc1.facebook.com
127.0.0.1   edge-mqtt-shv-12-frc3.facebook.com
127.0.0.1   edge-mqtt-shv-12-lla1.facebook.com
127.0.0.1   edge-mqtt-shv-12-prn1.facebook.com
127.0.0.1   edge-mqtt-shv-13-frc1.facebook.com
127.0.0.1   edge-mqtt-shv-17-prn1.facebook.com
127.0.0.1   edge-mqtt-shv-18-prn1.facebook.com
127.0.0.1   edgeray-origin-shv-05-prn2.facebook.com
127.0.0.1   edgeray-origin-shv-07-lla1.facebook.com
127.0.0.1   edgeray-origin-shv-09-frc3.facebook.com
127.0.0.1   edgeray-origin-shv-11-frc3.facebook.com
127.0.0.1   edgeray-shv-01-ams2.facebook.com
127.0.0.1   edgeray-shv-01-ams3.facebook.com
127.0.0.1   edgeray-shv-01-atl1.facebook.com
127.0.0.1   edgeray-shv-01-bru2.facebook.com
127.0.0.1   edgeray-shv-01-cdg2.facebook.com
127.0.0.1   edgeray-shv-01-dfw1.facebook.com
127.0.0.1   edgeray-shv-01-fra3.facebook.com
127.0.0.1   edgeray-shv-01-gru1.facebook.com
127.0.0.1   edgeray-shv-01-iad3.facebook.com
127.0.0.1   edgeray-shv-01-kul1.facebook.com
127.0.0.1   edgeray-shv-01-lax1.facebook.com
127.0.0.1   edgeray-shv-01-lga1.facebook.com
127.0.0.1   edgeray-shv-01-lhr3.facebook.com
127.0.0.1   edgeray-shv-01-mad1.facebook.com
127.0.0.1   edgeray-shv-01-mia1.facebook.com
127.0.0.1   edgeray-shv-01-mxp1.facebook.com
127.0.0.1   edgeray-shv-01-ord1.facebook.com
127.0.0.1   edgeray-shv-01-sea1.facebook.com
127.0.0.1   edgeray-shv-01-sin1.facebook.com
127.0.0.1   edgeray-shv-01-sjc2.facebook.com
127.0.0.1   edgeray-shv-01-syd1.facebook.com
127.0.0.1   edgeray-shv-01-vie1.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-ams3.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-atl1.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-bru2.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-cai1.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-cdg2.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-dfw1.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-fra3.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-gru1.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-iad3.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-kul1.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-lax1.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-lhr3.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-mad1.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-nrt1.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-ord1.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-sea1.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-01-syd1.facebook.com
127.0.0.1   edge-snaptu-http-p1-shv-02-cai1.facebook.com
127.0.0.1   edge-snaptu-tunnel-shv-01-ams3.facebook.com
127.0.0.1   edge-snaptu-tunnel-shv-01-ash5.facebook.com
127.0.0.1   edge-snaptu-tunnel-shv-01-atl1.facebook.com
127.0.0.1   edge-snaptu-tunnel-shv-01-bru2.facebook.com
127.0.0.1   edge-snaptu-tunnel-shv-01-cai1.facebook.com

답변1

/etc/nsswitch.conf 파일에서 "hosts" 섹션을 확인하십시오.

다음과 같아야 합니다.hosts: files dns

답변2

적절한 애플리케이션 방화벽이 없는 경우 한 가지 접근 방식은 다음과 같습니다.

  1. 비친화적인 서버와 관련된 범위 등 차단해야 하는 IP 범위를 식별합니다.
  2. 이 범위를 벗어나는 모든 트래픽을 차단하려면 방화벽 규칙을 추가하세요.

이것은 적어도 작동합니다.

관련 정보