In order to provide an environment for network experiments in the future, I use VirutalBox to create some hosts.
My real host is Ubuntu 14.04 LTS.
And I will install some OSs gradually.


Kali Linux Installation


Nothing more to record.
Just remember to configure the boot loader when you install it.
Or you will come across troubles.
Also, remember to add software sources:

vim /etc/apt/sources.list

Add:

deb http://mirrors.ustc.edu.cn/kali kali main non-free contrib
deb-src http://mirrors.ustc.edu.cn/kali kali main non-free contrib
deb http://mirrors.ustc.edu.cn/kali-security kali/updates main contrib non-free
deb http://http.kali.org/kali kali main non-free contrib
deb-src http://http.kali.org/kali kali main non-free contrib
deb http://security.kali.org/kali-security kali/updates main contrib non-free
deb http://ftp.sjtu.edu.cn/debian wheezy main non-free contrib
deb-src http://ftp.sjtu.edu.cn/debian wheezy main non-free contrib
deb http://ftp.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib
deb-src http://ftp.sjtu.edu.cn/debian wheezy-proposed-updates main non-free contrib
deb http://ftp.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib
deb-src http://ftp.sjtu.edu.cn/debian-security wheezy/updates main non-free contrib
deb http://mirrors.163.com/debian wheezy main non-free contrib
deb-src http://mirrors.163.com/debian wheezy main non-free contrib
deb http://mirrors.163.com/debian wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.163.com/debian wheezy-proposed-updates main non-free contrib
deb-src http://mirrors.163.com/debian-security wheezy/updates main non-free contrib
deb http://mirrors.163.com/debian-security wheezy/updates main non-free contrib

Then,

apt-get update && apt-get upgrade && apt-get dist-upgrade && apt-get autoremove && apt-get autoclean

Network Configuration:

vim /etc/network/interfaces:
add:

  • address 192.168.1.xxx
  • netmask 255.255.255.0
  • gateway 192.168.1.1
  • broadcast 192.168.1.255

vim /etc/resolv.conf:
add:

  • nameserver xxx.xxx.xxx.xxx

If you can't connect to the network, use:

  • route add default gw xxx.xxx.xxx.xxx

Bingo!

Copy from here. Thank him
Copy from here. Thank him


Metasploitable 2


Default Account:
username: msfadmin
password: msfadmin

Also, remember to Configure the network.


Windows XP SP3


Use it to learn penetration.

MSDN DOWNLOAD

If you want to do penetration exercise, DO NOT choose autoupate.
After configuring the network, you can ping other computers in your network.
But if XP's firewall is ON, then maybe other PC of yours can not ping it effectively.(At least, ICMP can't)
However, Nmap SYN scan can feel it.


CentOS 7 Installation


  • Download (I use CentOS 7 Minimal)

  • Network Configuration

Here I use Bridged-Adapter Mode, and I will descript the difference among Bridged-Adapter, Host-only and NAT in Appendix A

Then, let's dirty our hands in the OS:

Configure Gateway:
[root@localhost ~]# vi /etc/sysconfig/network

You should add:

NETWORKING=yes
GATEWAY=192.168.1.1 # configure the gateway IP

Configure DNS:
[root@localhost ~]# vi /etc/resolv.conf

add:

nameserver 192.168.1.1

Configure IP:
[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-enp0s3 (here is mine, yours may be difference)

add:

IPADDR=192.168.1.123
NETMASK=255.255.255.0
GATEWAY=192.168.1.1

and modify:

ONBOOT=yes
BOOTPROTO=static (if your local network's DHCP server is available , you can set it to *dhcp*)

Now:

service network restart

Completed!
And you can use

ping www.baidu.com

to test your network.

  • Install Desktop Environment

Firstly, you'd better update your OS:

yum update

Then:

yum groupinstall "X Window system"
yum groupinstall gnome

Completed!
And you can use

startx

to turn on the Desktop Environment.

P.S.
There is no ifconfig instruction in CentOS Minimal !
How can that be !!!

Solution:
Determine which packet provides that tool:

yum provides ifconfig

We can see that it is net-tools that provides ifconfig
So,

yum install net-tools

Bingo!
Now you can use it !
(You can do similarly to install other tools)

Here are Some questions:


Metasploitable2



Appendix A - Difference Among Bridged-Adapter, Host-only And NAT Mode


Learn from here

Virutal Machine always has these three modes:


Appendix B - Files About Network Configuration in Linux (RedHat series)


  • /etc/sysconfig/network

This file is used to configure hostname and whether to start up:

NETWORKING=yes # means your network will start up
GATEWAY=192.168.1.1

  • /etc/sysconfig/network-scripts/ifcfg-enp0s3 (the exact file-name is ifcfg-YOUR-NETWORK-CARD-NAME)

This file is about network configuration:

TYPE=Ethernet # network card type
DEVICE=eth0 # name of network card
ONBOOT=yes # boot or not when OS starts up
BOOTPROTO=static # use Address Protocol: static bootp dhcp
IPADDR=192.168.1.11 # network card's IP
NETMASK=255.255.255.0 # Sub-net mask
GATEWAY=192.168.1.1 # IP of gateway
DNS=10.203.104.41 # DNS server's IP
HWADDR=00:0C:29:13:5D:74 # MAC address
BROADCAST=192.168.1.255 # broadcast address

  • /etc/resolv.conf

This file is of DNS configuration.
And it mainly has four keywords:

nameserver # define the IP of DNS server
domain # define local host domain
search # define the seraching list of domain.It can't co-exist with domain entry
sortlist #

  • /etc/hosts

This file is the static information about host names (from FHS)
And it seems that the table in /etc/hosts is prior to DNS.
We can test: (I use apache2 on my PC and there is a index.html created by me in the /var/www/html/ directory)

service apache2 start

Then add

192.168.1.103 www.baidu.com

to your /etc/hosts. (Notice that 192.168.1.103 is my local IP)

Then I enter www.baidu.com in your browser's address table:

Network Experiment Environment Construction的更多相关文章

  1. VirtualBox network / study environment setup for RHEL

    I re-visited the RHEL study material and setup the environment again, noted down the procedure. 1, c ...

  2. [Z] 计算机类会议期刊根据引用数排名

    一位cornell的教授做的计算机类期刊会议依据Microsoft Research引用数的排名 link:http://www.cs.cornell.edu/andru/csconf.html Th ...

  3. IoT experitment

    Abstract: In order to solve the problems of complex experiment management, complicated teaching task ...

  4. linux tcp调优

    Linux TCP Performance Tuning News Linux Performance Tuning Recommended Books Recommended Links Linux ...

  5. Modelica学习

    Annotation Choices for Suggested Redeclarations and Modifications Replaceable model sample(start,int ...

  6. CentOS 6.5安装配置LNMP服务器(Nginx+PHP+MySQL)

    CentOS 6.5安装配置LNMP服务器(Nginx+PHP+MySQL) 一.准备篇: /etc/init.d/iptables stop #关闭防火墙 关闭SELINUX vi /etc/sel ...

  7. sqlplus使用(一)

    一,sqlplus 环境变量 sqlplus的环境变量(来自SQL*Plus® User's Guide and Reference Release 11.2) Parameter or Variab ...

  8. MIT jos 6.828 Fall 2014 训练记录(lab 6)

    源代码参见我的github: https://github.com/YaoZengzeng/jos 在这个实验中将实现一个基于Intel 82540M(又称E1000)的网卡驱动.不过,一个网卡驱动还 ...

  9. [转]Linux下的图形库介绍

    [转]Linux 下的图形库介绍 http://blog.csdn.net/gogor/article/details/5925925 在进行Linux下的图形系统编程时,我们常常会遇到以下这些概念: ...

随机推荐

  1. ABAP可以提高效率的小语法

    ADD dobj1 TO dobj2. Effect This statement has the same effect as the statement COMPUTE dobj2 = dobj2 ...

  2. 如何使用代码或脚本启用SharePoint的备用语言

    SP的多语言,需要安装语言包,然后手工去sharepoint下启动备用语言,如下图: [网站操作]-[语言设置]: 方法一:采用powershell处理 在很多项目情况下,需要用代码进行备用语言启动. ...

  3. 如何为基于windows验证的站点的某个页面、文件或文件夹单独设置匿名访问

    在MOSS的项目中,我们经常碰到要单独为基于windows验证的站点的某个页面.文件或文件夹单独设置匿名访问即不登录就可以直接访问.比如说站点的A的某些图片或文件URL存在B站点下的文件夹下.此时访问 ...

  4. linux集群运维工具:clustershell和pssh

    由于需要安装hadoop集群,有10台机器需要安装,一开始打算用SCP复制,后来觉得不可接受(实际现场可能数倍的机器集群,就是10台也不想干).后来在网上找了,发现了clustershell和pssh ...

  5. C/C++构建系统 GNU autotool

    我们在网上经常可以看到c/c++开源的项目,其中很多都是使用GNU的构建系统进行配置和编译的,如果按照规范构造这些的步骤,有一定的门槛和复杂度,下文把关于auotools系列的工具和概要的流程简要汇总 ...

  6. [IOS]《A Swift Tour》翻译(一)

    以下翻译内容为原创,转载请注明: 来自天天博客:http://www.cnblogs.com/tiantianbyconan/p/3768936.html 碎碎念... Swift是苹果在WWDC刚发 ...

  7. Java虚拟机JVM学习01 流程概述

    Java虚拟机JVM学习01 流程概述 Java虚拟机与程序的生命周期 一个运行时的Java虚拟机(JVM)负责运行一个Java程序. 当启动一个Java程序时,一个虚拟机实例诞生:当程序关闭退出,这 ...

  8. Android二维码识别 开源项目ZXing的编译

    Android二维码识别 开源项目ZXing的编译 Android端的条形码/二维码识别功能 因为手机端的输入不是很方便,所以条形码/二维码的扫描是一种很有效的解决手段. 比较流行的手机应用中,常用的 ...

  9. Java笔试题(一)

    一. 选择题(共50题,每题2分,共100分.多选题选不全或选错都不得分.) 7. 以下说法错误的是()/*这个我感觉是全对,谁知道哪个错啦,讲解下,非常感谢*/A) super.方法()可以调用父类 ...

  10. Android实现与PHP服务器的交互

    今天算是有点小激动呢!拿到Android与PHP这个课题已经两个星期了,直到今天才算是有了一点点小收获. 虽然还是没能成功上传到服务器,不过已经看到了曙光,已经实现了一半了,那就是已经连接到了服务器. ...