Home  >  Article  >  Operation and Maintenance  >  Virtual machine implementation of port forwarding example

Virtual machine implementation of port forwarding example

PHP中文网
PHP中文网Original
2017-06-20 09:33:552685browse

1. Application scenarios

  • #Breakthrough Internet access restrictions (such as restricting access to external networks within the company, but opening certain ports , you can use certain open ports to implement port redirection)

  • Remote desktop redirection

  • NC redirection to obtain Shell

2. Experimental environment

  • virtualbox virtual machine

  • Windows XP (as a firewall subnet client, Host -Only, ip: 1.1.1.10)

  • Firewall (two virtual network cards, one using bridge to connect to the physical network, and the other using Host-Only, ip: 1.1.1.1)

  • Kali Linux (install rinetd as a traffic forwarding station, bridge network, ip: 192.168.43.164)

  • Windows 2003 (as Server, bridge network, ip:192.168.43.149)

3. Experimental process

  • Configure fire protection rules

Enter the address http://1.1.1.1 in the XP browser, manage the firewall, and set the firewall rules to only port 53 for communication

  • In the card Install and configure rinetd (use the rinetd command to open it manually before use, and pkill rientd to end the process at the end)

Installation command: apt-get install rinetd

Configuration : Open the configuration file /etc/rinetd.conf, find # bindadress bindport connectaddress connectport, and use rinetd by setting these four parameters.

bindaddress: binding address (here refers to the address of kali)

bindport: binding port

connectaddress: the address to which traffic is forwarded (here refers to windows 2003)

Connectport (break through Internet access restrictions and forward to port 80, remote desktop forwarded to port 3389)

 

  • Access

If you want to break through the Internet restrictions, enter http://192.168.43.164:53 in the XP address bar to access the Windows 2003 page

  • Remote Desktop Management

Enter mstsc in the XP side running command to open the remote desktop management tool and enter 192.168.43.164:53, which will eventually remote desktop to Windows On server

  

The above is the detailed content of Virtual machine implementation of port forwarding example. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn