Guest User

Iptables

a guest
Nov 30th, 2022
2,520
0
Never
10
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. #!/bin/bash
  2. # Flush
  3. iptables -t nat -F
  4. iptables -t mangle -F
  5. iptables -F
  6. iptables -X
  7.  
  8. # Block All
  9. iptables -P OUTPUT DROP
  10. iptables -P INPUT DROP
  11. iptables -P FORWARD DROP
  12.  
  13. # allow Localhost
  14. iptables -A INPUT -i lo -j ACCEPT
  15. iptables -A OUTPUT -o lo -j ACCEPT
  16.  
  17. # Make sure you can communicate with any DHCP server
  18. iptables -A OUTPUT -d 255.255.255.255 -j ACCEPT
  19. iptables -A INPUT -s 255.255.255.255 -j ACCEPT
  20.  
  21. # CHANGED Make sure that you can communicate within your own network. CHANGE 192.168.50.0/24 TO YOUR LOCAL NETWORK
  22. iptables -A INPUT -s #.#.#.#/24 -d #.#.#.#/24 -j ACCEPT
  23. iptables -A OUTPUT -s #.#.#.#/24 -d 192.168.50.0/24 -j ACCEPT
  24.  
  25. # Allow established sessions to receive traffic:
  26. iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
  27.  
  28. # CHANGED Allow TUN. MAKE SURE YOUR INTERFACE IS CALLED wg-something. THE WG+ IS A WILDCARD.
  29. iptables -A INPUT -i wg+ -j ACCEPT
  30. iptables -A FORWARD -i wg+ -j ACCEPT
  31. iptables -A FORWARD -o wg+ -j ACCEPT
  32. iptables -t nat -A POSTROUTING -o wg+ -j MASQUERADE
  33. iptables -A OUTPUT -o wg+ -j ACCEPT
  34.  
  35. #CHANGED allow VPN connection. MAKE SURE THE WIREGUARD PORT IS CORRECT, MINE IS 1337
  36. iptables -I OUTPUT 1 -p udp --destination-port 1337 -m comment --comment "Allow VPN connection" -j ACCEPT
  37.  
  38. # Block All
  39. iptables -A OUTPUT -j DROP
  40. iptables -A INPUT -j DROP
  41. iptables -A FORWARD -j DROP
  42.  
  43. # Log all dropped packages, debug only.
  44.  
  45. iptables -N logging
  46. iptables -A INPUT -j logging
  47. iptables -A OUTPUT -j logging
  48. iptables -A logging -m limit --limit 2/min -j LOG --log-prefix "IPTables general: " --log-level 7
  49. iptables -A logging -j DROP
  50.  
  51. echo "saving"
  52. iptables-save > /etc/iptables.rules
  53. echo "done"
  54. #echo 'openVPN - Rules successfully applied, we start "watch" to verify IPtables in realtime (you can cancel it as usual CTRL + c)'
  55. #sleep 3
  56. #watch -n 0 "sudo iptables -nvL"
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Tazlodorn
    234 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment