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/?q=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 λ₯Ό 좜λ ₯ν•˜λ„λ‘ κ΅¬ν˜„λ˜μ–΄ 있기 λ•Œλ¬Έμ΄λ‹€.

νŒŒλΌλ―Έν„°λ‘œ q 값에 IP λ₯Ό λ„£μ–΄μ£Όλ©΄ ν•΄λ‹Ή IP 에 λŒ€ν•œ 정보λ₯Ό 보여쀀닀. (μ›Ή 동일)

728x90