Local Port Forwards
# Local Port Forwarding (using rinetd)
# Target Machine // 10.0.0.1
Python -m SimpleHTTPServer 80
# Gateway Machine
apt-get install rinetd
nano /etc/rinetd.conf
localhost localport remotehost remoteport
127.0.0.1 53 10.0.0.1 80
# Kali Machine // http://gatway:53 → http://10.0.0.1:80
# Local Port Forwarding (using netcat)
# Target Machine // 10.0.0.1
nc -lnvp 22
# Gateway Machine
mknod relaynode p
nc -lvnp 1111 0<relaynode | nc 10.0.0.1 22 1>relaynode
# Kali Machine
nc gateway 1111
# Local Port Forwarding (using SSH)
# Target Machine // 10.0.0.1
Python -m SimpleHTTPServer 80
# Gateway Machine
nano /etc/ssh/sshd_config
Port 53
# Kali Machine
// Now we will connect to the gateway through ssh on port 53, then we will connect
// port 8080 on the internal machine with port 80 on the web server machine.
ssh user@gateway -p 53 -L 127.0.0.1:8080:10.0.0.1:80
// Now browse to http://127.0.0.1:8080 -> http://10.0.0.1:80
Last updated