Jump to content

Recommended Posts

Posted

i keep geting an error when i try to launch ./iptables.sh

error:

iptables: Invalid argument

 

Operating System:  Debian 5.0 64-bit

 

Here's the code of iptables.sh

 

#!/bin/sh
IPT=/sbin/iptables

UNPRIPORTS="1024:65535"
INET_IFACE="eth0"

$IPT -A INPUT -i lo -j ACCEPT
$IPT -A OUTPUT -o lo -j ACCEPT
$IPT -A OUTPUT -o eth0 -j ACCEPT
$IPT -A INPUT -i eth0 -p tcp --dport 22 -j ACCEPT
$IPT -A INPUT -i eth0 -p tcp -m tcp --dport 2106 -j ACCEPT
$IPT -A INPUT -i eth0 -p tcp --dport 7000 -j ACCEPT
$IPT -A INPUT -i eth0 -p tcp --dport 80 -j ACCEPT
$IPT -A INPUT -i eth0 -p tcp --dport 3306 -j ACCEPT -s 127.0.0.1
$IPT -A INPUT -i eth0 -p tcp -m tcp --dport 7777 -j DROP
$IPT -I INPUT -i eth0 -p tcp --dport 2106 -m connlimit --connlimit-above 2 -j DROP 
$IPT -I INPUT -i eth0 -p tcp --dport 7777 -m connlimit --connlimit-above 5 -j DROP
$IPT -A INPUT -p icmp -i eth0 -j ACCEPT
$IPT -A INPUT -i eth0 -p tcp --dport 25 -j ACCEPT
$IPT -A INPUT -i eth0 -p tcp --dport 110 -j ACCEPT 
$IPT -A INPUT -i eth0 -p tcp -m tcp --tcp-flags FIN,SYN,ACK SYN -j REJECT --reject-with icmp-port-unreachable
$IPT -A INPUT -p icmp --icmp-type 8 -s 0/0
$IPT -A INPUT -p udp -m udp -i $INET_IFACE --dport $UNPRIPORTS --sport 53 -j ACCEPT
$IPT -A INPUT -p tcp -m tcp -i $INET_IFACE --dport 1024:65353 --sport 53 -j ACCEPT
$IPT -A INPUT -p tcp -m tcp -i $INET_IFACE --dport $UNPRIPORTS --sport 21 -j ACCEPT ! --syn
$IPT -A INPUT -p tcp -m tcp -m multiport -i $INET_IFACE --dport $UNPRIPORTS -j ACCEPT --sports 80,443 ! --syn
$IPT -A INPUT -p tcp -m tcp -i $INET_IFACE --dport $UNPRIPORTS --sport 25 -j ACCEPT

$IPT -P INPUT DROP
$IPT -P OUTPUT ACCEPT

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Posts

    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market
    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market
    • try to send the PID of l2.bin to active64.sys service and we will avoid to buy aac license xD. i will try it in the next days. 😄
    • 🤝 SocNet is looking for new partners and suppliers!  We are building a reliable partner network across all areas of online business.  If you're in digital, traffic, accounts, or media — let’s discuss collaboration opportunities.   📌 Open to:  — Webmasters and media buyers  — Telegram channel and website owners  — Sellers of accounts and auto-registered profiles  — Developers of digital services  — Marketing agencies and freelancers 💬 We value quality, transparency, and growth. If that resonates with you — get in touch!   📎 Our current list of partners:  🔗 https://socnet.bgng.io/partners   📦 Our key products:  🛒 Online Store: Click ✅  🤖 Telegram Bot: Click ✅  📲 SMM Panel: Click ✅   📩 Contact us:  💬 Telegram: https://t.me/solomon_bog  📱 WhatsApp: https://wa.me/79051904467  🎮 Discord: https://discord.gg/y9AStFFsrh  📧 Email: solomonbog@socnet.store   📢 Follow updates: https://t.me/accsforyou_shop ✅
    • 🤝 SocNet is looking for new partners and suppliers!  We are building a reliable partner network across all areas of online business.  If you're in digital, traffic, accounts, or media — let’s discuss collaboration opportunities. 📌 Open to:  — Webmasters and media buyers  — Telegram channel and website owners  — Sellers of accounts and auto-registered profiles  — Developers of digital services  — Marketing agencies and freelancers 💬 We value quality, transparency, and growth. If that resonates with you — get in touch! 📎 Our current list of partners:  🔗 https://socnet.bgng.io/partners 📦 Our key products:  🛒 Online Store: Click ✅  🤖 Telegram Bot: Click ✅  📲 SMM Panel: Click ✅ 📩 Contact us:  💬 Telegram: https://t.me/solomon_bog  📱 WhatsApp: https://wa.me/79051904467  🎮 Discord: https://discord.gg/y9AStFFsrh  📧 Email: solomonbog@socnet.store 📢 Follow updates: https://t.me/accsforyou_shop ✅
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock