I am not good with linux. I need to know 3 ways to block HTTP service on port 80 for a specific host on my machine. I need 3 commands or tools. I have looked everywhere and all I can find is the command to block HTTP service by the IP tables. Please help, even if you can point me in the right direction, it would be appreciated.
All HTTP connections are translated on the client, before asking your DNS server, using a hosts
file. Here you can list a specific host name and use the shortcut of your local machine 127.0.0.1
. Thus, that address is effective not resolved, and the resource will typically return a 404
error (unless you are running a local webserver with a similar path). It's not considered the best solution, but a very simple common solution. The host file is located at /etc/hosts
. Its a text file that you can edit. Research for more detailed info and syntax.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다