IT Talks/Linux

์„œ๋ฒ„์˜ ๊ณต์ธ IP ํ™•์ธํ•˜๊ธฐ

OkOJJ 2023. 2. 22. 11:52

์ผ๋ฐ˜์ ์ธ ๋ฆฌ๋ˆ…์Šค ์„œ๋ฒ„๋Š” ์ด๋”๋„ท๋ณ„๋กœ IP๋ฅผ ํ• ๋‹นํ•˜์—ฌ ifconfig ๋ช…๋ น์–ด๋กœ ํ• ๋‹น๋œ IP ๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์œผ๋‚˜ AWS (Amazon Web Service)๋“ฑ์˜ ํด๋ผ์šฐ๋“œ ์žฅ๋น„์—์„œ๋Š” Private IP ๋งŒ ํ™•์ธ์ด ๊ฐ€๋Šฅํ•˜๊ณ  Public IP ๋Š” Amazon Console ๋“ฑ์„ ํ†ตํ•ด์„œ ํ™•์ธ์ด ๊ฐ€๋Šฅํ•˜๋‹ค.

๋˜๋Š” NAT ์•„๋ž˜์— ์œ„์น˜ํ•œ ์„œ๋ฒ„๋“ค์˜ ๊ฒฝ์šฐ๋„ ์‹ค์ œ ํ• ๋‹น๋œ IP๋Š” ์‚ฌ์„ค IP๋งŒ ํ‘œ์‹œ๋˜๊ณ , ์™ธ๋ถ€ ์ ‘์†์‹œ ์™ธ๋ถ€ ์„œ๋ฒ„์—์„œ ์ธ์‹ํ•˜๋Š” IP ๋Š” NAT ์˜ IP ๊ฐ€ ๋œ๋‹ค.

์ด๋Ÿฐ ๊ฒฝ์šฐ ์„œ๋ฒ„์—์„œ ๊ฐ„๋‹จํ•˜๊ฒŒ ์™ธ๋ถ€๋กœ ์ ‘์†ํ•˜๋Š” ๋ณธ์ธ IP๋ฅผ ํ™•์ธํ•˜๋Š” ๋ฐฉ๋ฒ•์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

1. ํ˜„์žฌ ์‚ฌ์šฉ์ค‘์ธ ์„œ๋ฒ„์˜ ๊ณต์ธIP ์กฐํšŒ (Outbound)

$ curl ip.ojj.kr
Your IP is 175.123.191.3

 

2. ํŠน์ • IP์˜ ์ •๋ณด ์กฐํšŒ

$ curl ip.ojj.kr/s/1.1.1.1
* Query : 1.1.1.1
* Result :
%kwhois % [whois.apnic.net]
% Whois data copyright terms    http://www.apnic.net/db/dbcopyright.html

% Information related to '1.1.1.0 - 1.1.1.255'

% Abuse contact for '1.1.1.0 - 1.1.1.255' is 'helpdesk@apnic.net'

inetnum:        1.1.1.0 - 1.1.1.255
netname:        APNIC-LABS
descr:          APNIC and Cloudflare DNS Resolver project
descr:          Routed globally by AS13335/Cloudflare
descr:          Research prefix for APNIC Labs
country:        AU
org:            ORG-ARAD1-AP
admin-c:        AR302-AP
tech-c:         AR302-AP
abuse-c:        AA1412-AP
status:         ASSIGNED PORTABLE
remarks:        ---------------
remarks:        All Cloudflare abuse reporting can be done via
remarks:        resolver-abuse@cloudflare.com
remarks:        ---------------
mnt-by:         APNIC-HM
mnt-routes:     MAINT-AU-APNIC-GM85-AP
mnt-irt:        IRT-APNICRANDNET-AU
last-modified:  2020-07-15T13:10:57Z
source:         APNIC

(์ดํ•˜ ์ƒ๋žต...)

์›๋ฆฌ๋Š” curl ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด http://ip.ojj.kr ๋ฅผ ์ ‘์†ํ•˜๋Š”๊ฑด๋ฐ, ip.ojj.kr ์‚ฌ์ดํŠธ์—์„œ๋Š” ๋ฆฌ๋ˆ…์Šค์—์„œ ์ ‘์†ํ•œ ๊ฒฝ์šฐ๋Š” Plain Text ๋กœ IP ๋งŒ ์ถœ๋ ฅํ•˜๊ณ , ์›น๋ธŒ๋ผ์šฐ์ €์—์„œ ์ ‘์†ํ•œ ๊ฒฝ์šฐ๋Š” UI ๋ฅผ ์ถœ๋ ฅํ•˜๋„๋ก ๊ตฌํ˜„๋˜์–ด ์žˆ๊ธฐ ๋•Œ๋ฌธ์ด๋‹ค.

๋„๋ฉ”์ธ ๋’ค์— /s/1.2.3.4 ์™€ ๊ฐ™์ด ์ถ”๊ฐ€ํ•˜๋ฉด ํ•ด๋‹น IP ์— ๋Œ€ํ•œ ์ •๋ณด๋ฅผ ๋ณด์—ฌ์ค€๋‹ค. (์›น ๋™์ผ)

728x90