Linux: узнать публичный IP сервера из консоли
18 Серпня 2020dig [simterm] $ dig +short myip.opendns.com @resolver1.opendns.com 194.***.***.26 [/simterm] curl [simterm] $ curl ifconfig.co $ curl ifconfig.me $ curl icanhazip.com [/simterm]
dig [simterm] $ dig +short myip.opendns.com @resolver1.opendns.com 194.***.***.26 [/simterm] curl [simterm] $ curl ifconfig.co $ curl ifconfig.me $ curl icanhazip.com [/simterm]
С помощью history: [simterm] $ history -cw [/simterm] См. –help: [simterm] $ history –help history: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg…] Display or manipulate the history list. Display the history list with line numbers, prefixing each modified entry with a `*’. An argument of N lists only… Читати далі »
Telnet Самый широкоизвестный и просто способ – с поомщью telnet: [simterm] $ telnet example.com 80 Trying 93.184.216.34… Connected to example.com. Escape character is ‘^]’. [/simterm] NetCat Другой вариант – NetCat (nc), больше возможностей: [simterm] $ nc -zv example.com 80 Warning: Inverse name lookup failed for `93.184.216.34′ example.com [93.184.216.34] 80 (http) open [/simterm]