This is very helpful when you are looking to access a VPN network (or a network accessible from a specific machine) from a different windows box. Assuming you are connected to VPN form Linux box - below commands will help
On Windows
route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 kali_IP
on Linux
sudo sysctl net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
sudo iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i eth0 -o tun0 -j ACCEPT
##tun0 = VPN Network
##eth0 = Windows and Linux Interface
Transparent Proxy
sudo sysctl net.ipv4.ip_forward=1
sudo iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 8080
sudo iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 443 -j REDIRECT --to-port 8080
Comments
Post a Comment