contains a rule to dump my outgoing packets to 10.199 network as,

:INPUT ACCEPT [122:9273]
:OUTPUT ACCEPT [73:8165]
-A OUTPUT -d -j REJECT --reject-with icmp-port-unreachable

To ensure, these rules are added on every machine boot, i have added this rule in /etc/rc.local as,

iptables-restore < /etc/iptables.conf 

But on every bootup, the iptables are not loaded with this new rule. I am using Centos 7.0.1406.

This instructions i am following from this post.

  • Is the rule actually meant for 10.199.x.x network or 10.199.48.x network? Because the rules says /24 ! Just asking.... – neuron Jul 31 '15 at 16:35
  • Look for the guide for your own distribution, not for Ubuntu. Here's RHEL7 Security Guide. Related: serverfault.com/q/626521/290746 – yaegashi Jul 31 '15 at 16:38
  • @Neuron, it is meant for 10.199.48.x network... – Madhavan Aug 1 '15 at 0:46

/etc/rc.local is a symlink to /etc/rc.d/rc.local in CentOS 7 so you have to ensure that /etc/rc.d/rc.local is executable if you want to start things this way, so you can do:

chmod +x /etc/rc.d/rc.local

and then to start the service:

systemctl start rc-local

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.