`
spr.perfect
  • 浏览: 32229 次
  • 性别: Icon_minigender_1
  • 来自: 大连
最近访客 更多访客>>
社区版块
存档分类
最新评论

Linux Admins: Discover, Map and Store

阅读更多
http://www.enterprisenetworkingplanet.com/netos/article.php/3650131
December 19, 2006 By Carla Schroder

At the cost of great exertion and mental prowess, I have collected just for you an astounding assortment of useful commands and tools for performing amazing feats like network host discovery and mapping your network, mapping IP addresses to their physical locations, spying on everyone who is logged into a computer and even better, faster, securer remote file access.

Discovering Who's On Your Network

Even small networks can pick up some surprise guests that slip in when you're not looking. Or maybe, as your network has grown, you haven't been very diligent about keeping track of IP addresses, so you want to make a list. You don't have to run around to every network host, but can perform host discovery from the comfort of your network administrator lair. There are a lot of ways to do this. One way is to use nmap. This example queries DNS for IP addresses and hostnames:

# nmap -sL 192.168.1.* | grep (
Starting Nmap 4.10 ( http://www.insecure.org/nmap/ ) at 2006-12-18 18:37 PST
Host phineasfreak.alrac.net (192.168.1.25) not scanned
Host freewheelinfranklin.alrac.net (192.168.1.26) not scanned
Host fatfreddy.alrac.net (192.168.1.50) not scanned
Nmap finished: 256 IP addresses (0 hosts up) scanned in 8.248 seconds

This command pings the network to see who is up, and reports IP addresses, hostnames, and MAC addresses and names:

# nmap -sP 192.168.1.*
Starting Nmap 4.10 ( http://www.insecure.org/nmap/ ) at 2006-12-18 18:42 PST
Host freewheelinfranklin.alrac.net (192.168.1.26) appears to be up.
MAC Address: 00:00:24:C1:1D:F0 (Connect AS)
Host fatfreddy.alrac.net (192.168.1.50) appears to be up.
MAC Address: 00:0D:B9:05:25:B4 (PC Engines GmbH)
Nmap finished: 256 IP addresses (5 hosts up) scanned in 4.657 seconds

Plain old nmap with no options finks off hosts that are up and what services are running:

# nmap 192.168.1.*
Interesting ports on fatfreddy.alrac.net (192.168.1.50):
Not shown: 1677 closed ports
PORT STATE SERVICE
22/tcp open ssh
631/tcp open ipp
MAC Address: 00:0D:B9:05:25:B4 (PC Engines GmbH)

You can even have nmap perform its famous operating system detection with nmap -sS -O 192.168.1.*. This shows everything that the previous nmap commands report plus the operating system running on each host. This is a slow scan, so take advantage to go take a healthy break.

Network Mapping With Cheops-ng

Cheops-ng is a GTK-based front end to nmap that draws nice diagrams of your network. You have to run it as root– using sudo doesn't work because it doesn't know how to handle the sudo password. Start it up like this:

# cheops-agent & 
# cheops-ng

Enter 127.0.0.1 in the dialog box. First it runs an "enqueueing scan" at startup to discover your network hosts, then runs a detailed scan on each host in turn. This can take awhile– this is the command that it runs on each host:

nmap -oX - -n -sT -T Normal -O -sR -I -F -P0 [IP address]

When it is finished it stops itself, leaving behind a nice map of your network. This won't be entirely accurate if you have dumb switches– it won't see them because they are not ping-able, so it will look like the machine you are running the scan from is a switch<!---->.

You can configure different types of scans, save your maps and drag the images on the maps around. Right-clicking on the images of your hosts lets you see all the information that Cheops-ng collected.

Whowatch

whowatch monitors logins in real time, so you can see all users accessing your system as they come and go <!---->.

The display is similar to the finger command, except it continually updates like the top command. There are no command options, just toggle keys to use while it's running. You can see the process trees for each user, what process they used to log in, and even kill processes and users.

Finding IP Addresses on a Map

Go to ip-adress.com. The first thing you see will be your own location on a map, complete with latitude, longitude, name of your service provider, and a pin stuck right through your house. Once the shock of being discovered has passed, use this to spy on other people.

Easy Secure Remote File Editing With sshfs

We all have our favorite methods of using SSH for secure remote access. SSH is slick, quick, and operates well over slow links. The one downside is you have to transfer files to your local PC to edit them, then transfer them back. This isn't too bad, but there is an alternative for folks who want an easier way. With sshfs you can mount any remote filesystem to your local PC, and access it just like any local filesystem. This magic happens thanks to FUSE– Filesystem In Userspace.

If your system is already set up with FUSE and sshfs, and you have a local directory for the mountpoint, this command will do the job:

carla@xena:~$ sshfs stinkpad: temp/
carla@stinkpad's password:
carla@xena:~$

Open your favorite file manager to the mountpoint, and there are your remote files. If it doesn't work, follow these steps:

  • Install sshfs and fuse-utils
  • Create a mountpoint that you have permission to access. FUSE operates in userspace, so a subdirectory in your home directory works fine
  • Create the fuse group and add yourself to it
  • Log completely out, then log back in again
  • Load the fuse kernel module (modprobe fuse)

Now run the sshfs command again. If it doesn't work again, take your error to message to Google, and take a look at the links in Resources. Most modern distributions have FUSE support in the kernel, so all you need to do is load the module. Look for CONFIG_FUSE_FS=m in your /boot/config-[version] file.

Unmount it like this:

carla@xena:~$ fusermount -u temp/sshfs 

Users who are new to sshfs always ask these questions:

  1. Why not just run X over SSH?
  2. Why not just use NFS?

The answer is do what you want, no one cares. Some things to consider: It's faster and more secure than running X over SSH, it's a heck of a lot easier to set up than NFS, and a zillion times more secure.

Resources

分享到:
评论

相关推荐

    admins:游戏后台管理系统

    总结来说,"admins:游戏后台管理系统"是一个采用Vue.js前端、AmazeUI UI库、SSDB数据库和Echo Web框架的开源解决方案,旨在为游戏运营提供高效、稳定且易于定制的管理工具。其开源特性鼓励社区参与和改进,有助于...

    Kubernetes Management Design Patterns: With Docker, CoreOS Linux, and Other

    Linux admins, CoreOS admins, application developers, and container as a service (CAAS) developers. Some pre-requisite knowledge of Linux and Docker is required. Introductory knowledge of Kubernetes is...

    local_admins:用于查找域中所有本地管理员的 PowerShell 脚本

    Active Directory 本地管理员此 PowerShell 脚本将在名为“computers.txt”的行分隔文件中根据域中的计算机列表(带有域名前缀)搜索您的 Windows Active Directory 域。 此脚本将输出“localadmins.csv”,给出能够...

    Linux Transfer for Windows Network Admins 2003

    Linux Transfer for Windows Network Admins 2003

    英文原版-DevOps Troubleshooting Linux Server Best Practices 1st Edition

    DevOps can help developers, QAs, and admins work together to solve Linux server problems far more rapidly, significantly improving IT performance, availability, and efficiency. To gain these benefits,...

    Kubernetes Management Design Patterns(Apress,2017)

    Linux admins, CoreOS admins, application developers, and container as a service (CAAS) developers. Some pre-requisite knowledge of Linux and Docker is required. Introductory knowledge of Kubernetes is...

    Linux常用命令 Linux TXT

    - `groupadd admins` 创建名为 admins 的新用户组。 #### 二、文件与目录管理 **1. mkdir** - **功能描述**:`mkdir` 命令用于创建目录。 - **基本语法**:`mkdir [选项] directory` - **示例**: - `mkdir ...

    cmssdt Wiki

    * ai-admins: get access GitLab repos and foreman * cms-sdt-aibox-admins: Add access CMS SDT Build openstack project * cms-git-vocmssdt-admins: To have access to puppet gitlab repos * cms-sdt-logs:...

    百优客信息发布系统V3.0-免费版

    2.上传时请修改后台网址路径 方法:打开 wwwroot 后将 admins 文件夹重命名,修改后后台网址也将改变,将后台网址中的 admins 更换成修改后的文件夹名 即可; 演示网址:http://www.baiyouke.com

    专业主机管理软件Plesk..Reloaded.for.Linux-Unix.、Windows].plesk-7.5r-admins-guide

    Plesk是一款全球知名的专业主机管理软件,它为Linux和Unix以及Windows操作系统提供了强大的管理工具,旨在简化服务器运维和网站管理任务。Plesk以其用户友好的界面和高效的工作流程,深受广大系统管理员和Web开发者...

    ansible-role-icinga2-dockerized:构建Icinga2 Docker映像的Ansible角色

    您应该定义以下变量以启动icinga2 icinga2: ido: user: icinga2 pass: rocOrfyad dbserver: mysql dbname: icinga2 web: ... admins: - foo - bar 使用openssl passwd -1 'password'生成密码

    Linux教程-linux权限管理.docx

    在Linux系统中,权限管理是核心的组成部分,它确保了用户和进程对于系统资源的访问控制。本教程将深入探讨Linux中的文件权限管理,包括如何改变文件的所有者、属组以及详细解读文件权限的含义。 首先,我们来看如何...

    淘特站内搜索引擎For帝国CMS版v4.0

    系统介绍 此系统通过淘特JSP站内搜索引擎,将帝国CMS中的... 使用方法 1、登录后台//localhost:8080/searchportal/ 默认用户名:admins 密码:admins 2、配置:网站地址、数据库连接参数(数据库URL、用户名、密码)

    linux常用命令复习

    ### Linux常用命令复习知识点 #### 用户管理命令 - **`useradd`**:用于创建新的用户账户。 - **选项**: - `-d 目录`:指定新用户的家目录,若目录不存在则需要结合 `-m` 选项来创建。 - `-g 已存在的组名`:...

    E天货源信息发布系统 v2.0 免费版.rar

    系统功能如下: 资料修改 系统配置 ≡ 广告管理 ≡ ...修改后路径方法:解压后打开wwwroot将admins文件夹重命。登陆后台网址时将admins替换成重名命的文件夹名即可。 BBS论坛管理登陆帐号:admins 密码:admins

    多机部署Hyperledger Fabric+Composer(两台机器)

    Admins: Type: Signature Rule: "OR('OrdererMSP.admin')" # Org1定义了第一个组织 - &Org1 Name: Org1 ID: Org1MSP MSPDir: crypto-config/peerOrganizations/org1.example.com/msp AnchorPeers: - Host...

    CentOS安装Nagios和监控Linux、Windows客户端以及微信报警详细配置

    ### CentOS安装Nagios及其监控Linux与Windows客户端的配置详解 #### 一、概述 Nagios是一款开源的网络监控系统软件,它可以帮助系统管理员跟踪网络中的主机和服务的状态,并在出现异常时通过电子邮件、短信或...

    2022最新thinkphp框架源码交易系统/资源网站源码

    请在Linux服务器中使用本程序,Windows中无法使用。 源码安装方法: 1、导入根目录下的dkewl.sql数据库文件。 2.打开数据库表yjcode_control,将weburlv字段里网址改成你自己的,记得要加上反斜杠,如:...

Global site tag (gtag.js) - Google Analytics