Advertisement
Aveneid

iptables

Apr 8th, 2022
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. echo 1 > /proc/sys/net/ipv4/ip_forward
  4.  
  5. iptables -F
  6. iptables -t nat -F
  7. iptables -X
  8.  
  9. iptables -t nat -A PREROUTING -p tcp --dport 25566 -j DNAT --to-destination 10.8.0.3:25565
  10. iptables -t nat -A POSTROUTING -p tcp -d 10.8.0.3 --dport 25566 -j SNAT --to-source 10.0.0.11
  11.  
  12. #iptables -A INPUT -i eth0 -j ACCEPT
  13. #iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
  14. #iptables -A OUTPUT -j ACCEPT
  15.  
  16. #iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement