-------------------------------------------
Searching for idle public IP addresses in a CIDR Block
-------------------------------------------
1. ifconfig-a view the Linux server's Internet Nic IP address and subnet mask information, through the www.subnet-calculator.com to calculate the IP address range of The Subnet
2. Use iisputner to scan the IP address range, pay attention to the IP address with an empty HTTP banner, and then use zenmap to scan the IP address. If no open port exists, it indicates that the IP address is an idle IP address.
-------------------------------------------
How to enable public Network VPN on a Linux Server
Lab environment: Red Hat Enterprise Linux 5 single Nic
Kernel version: 2.6.18-8. EL5
-------------------------------------------
1. Check whether the kernel supports MPPE.
# Modprobe ppp-compress-18 & Echo congratulations!
Ii. Download pptpd
64-bit Operating System
# Wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.x86_64.rpm
32-bit Operating System
# Wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.i386.rpm
3. Install pptpd
64-bit Operating System
# Rpm-IVH pptpd-1.3.4-1.rhel5.1.x86_64.rpm
32-bit Operating System
# Rpm-IVH pptpd-1.3.4-1.rhel5.1.i386.rpm
4. Edit the/etc/pptpd. conf file
# Vi/etc/pptpd. conf
Localip 192.168.0.20.--> IP address of the server's Internet Nic
Remoteip 192.168.0.160-162 --> enter the CIDR Block assigned to the dial-in user, or enter a separate IP address.
5. Add a VPN user and password
# Vi/etc/PPP/chap-secrets
Jamsbond pptpd jamsbond_007 192.168.0.161 --> Format: VPN user pptpd VPN user password the IP address assigned after the user dials in
6. Set DNS to Google DNS
# Vi/etc/PPP/options.ppt PD
MS-DNS 8.8.8.8
MS-DNS 8.8.4.4
7. Edit the/etc/sysctl. conf file
# Vi/etc/sysctl. conf
Net. ipv4.ip _ forward = 1
# Sysctl-P
8. Restart the pptpd Service
# Service pptpd restart
9. Set pptpd to automatically start upon startup
# Chkconfig pptpd on
10. Disable iptables Firewall
# Service iptables stop
11. Change MTU to solve the problem that the web page cannot be opened after VPN dial.
# Iptables-I forward-s 192.168.0.0/24-P TCP-M TCP -- TCP-flags SYN, RST syn-J tcpmss -- Set-MSS 1300