PROBLEM SOLVED! NAILED IT! Thank you @dpeca I ADDED both ports to the same iptable rule using --match multiport , and changed --dport to the --dports My custom.sh iptable rules below, if someone looking into this you should change the ip ranges to your own country so only you can connect into the se...
But i had a error when i add the rules to 8083 port aswell iptables v1.8.2 (nf_tables): invalid mask `8083' specified Try `iptables -h' or 'iptables --help' for more information. My custom.sh after adding port 8083 #!/bin/bash iptables -A INPUT -p tcp --dport 22 -s 5.157.88.0/24 -j ACCEPT iptables -...
Successfully UPDATED the script and got no errors. it's not worked but you said earlier that to put the DROP to last line, so i did it AND IT'S WORKING! OMG I LOVE YOU BROTHER! THANK YOU SO MUCH FOR YOUR ENORMOUS SUPPORT! OMG I LOVE YOU MAN! THIS IS THE FIRST TIME I GOT WORKING IPTABLES RULES! OMG! ...
This is the problem i guess? i have no idea. /usr/local/vesta/bin/v-update-firewall: /root/update_firewall_custom.sh: /bin/bash^M: bad interpreter: No such file or directory The problem found, it's because i made the script in windows notepad++, so i tried to make the script using nano command to t...
Oh I'm sorry i didn't, now i did it and got this errors /usr/local/vesta/bin/v-update-firewall: /root/update_firewall_custom.sh: /bin/bash^M: bad interpreter: No such file or directory 'ptables v1.8.2 (nf_tables): Invalid target name `ACCEPT Try `iptables -h' or 'iptables --help' for more informatio...
The both ways didn't worked for me. after adding them to the server and suspend the ssh from panel i canno't login into ssh. The custom.sh i made #!/bin/bash iptables -A INPUT -p tcp --dport 22 -j DROP iptables -A INPUT -p tcp --dport 22 -s 45.121.88.0/22 -j ACCEPT iptables -A INPUT -p tcp --dport 2...