Posts

Showing posts with the label iptables

iptables block outgoing on port, allow selected IP's

The iptables rules are evaluated in order, which means that if you block everything in the first rule, there is no point to allow something later, those rules will never be reached. I'm quite sure you don't want to match the source address, you want the destination. iptables -A OUTPUT -p tcp -d 127.0.1.1 --match multiport --dports 25,587,465 -j ACCEPT iptables -A OUTPUT -p tcp -d **.**.**.*** --match multiport --dports 25,587,465 -j ACCEPT iptables -A OUTPUT -p tcp -d **.**.**.*** --match multiport --dports 25,587,465 -j ACCEPT iptables -A OUTPUT -p tcp --match multiport --dports 25,587,465 -j REJECT

iptables not working through shell script in crontab

just add /sbin/iptables in front of rules

Iptables

NO route to HOST cd /etc/sysconfig/ check vi /etc/rc.local for iptables /bin/sh /home/sas/timepass.sh (this should load first) check iptables For abuse report attack on another server using port 80 and 443 ## Block 80 & 443 Outgoing from the server due to abuse request iptables -I OUTPUT -p tcp --dport 80 -j DROP iptables -I OUTPUT -p tcp --dport 443 -j DROP