๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
๐Ÿ’ปTech/๐ŸงLinux

[๋ฆฌ๋ˆ…์Šค] resolv.conf ์›๋ณต ํ˜„์ƒ ์กฐ์น˜๋ฐฉ๋ฒ•

by _viper_ 2023. 11. 21.
๋ฐ˜์‘ํ˜•

์„œ๋ฒ„๊ฐ€ ์žฌ๊ธฐ๋™ ๋˜๋ฉด์„œ /etc/resolv.conf ํŒŒ์ผ์˜ ๋ณ€๊ฒฝ ๋‚ด์šฉ์ด ์›๋ณต๋˜๋Š” ํ˜„์ƒ์— ๋Œ€ํ•œ ์กฐ์น˜ ๋ฐฉ๋ฒ•์ž…๋‹ˆ๋‹ค.

ํŒŒ์ผ์˜ ๋ณ€๊ฒฝ ๋‚ด์šฉ์ด ์„œ๋ฒ„ ์žฌ๊ธฐ๋™ ํ›„์— ์›๋ณต๋˜๋Š” ํ˜„์ƒ์€ ์ฃผ๋กœ ๋„คํŠธ์›Œํฌ ๊ด€๋ฆฌ ๋„๊ตฌ๋‚˜ ์„œ๋น„์Šค์— ์˜ํ•ด ํŒŒ์ผ์ด ์ž๋™์œผ๋กœ ๊ด€๋ฆฌ๋˜๊ธฐ ๋•Œ๋ฌธ์— ๋ฐœ์ƒํ•ฉ๋‹ˆ๋‹ค.

 

โ—พ /etc/resolv.conf ์ˆ˜์ •, ์‚ญ์ œ ์ œํ•œ

  • ์ง์ ‘ ํŽธ์ง‘ํ•˜์ง€ ๋ชปํ•˜๋„๋ก chattr +i ๋ช…๋ น์„ ์‚ฌ์šฉํ•˜์—ฌ ํŒŒ์ผ์„ ์ž ๊ธˆ

 

## ์ž ๊ธˆ
chattr +i /etc/resolv.conf

## ์ž ๊ธˆ ํ•ด์ œ
chattr -i /etc/resolv.conf