Results 1 to 3 of 3
Thread: job fails for "restart iptables"
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- May 2012
job fails for "restart iptables"
sudo vi /etc/sysconfig/iptables
-A INPUT -p tcp -m state --state NEW -m tcp --dport 5903 -j ACCEPT
sudo systemctl restart iptables.service Job failed. See system logs and 'systemctl status' for details.
Oct 8 00:13:49 canard iptables.init: iptables: Applying firewall rules: iptables-restore: line 1 failed Oct 8 00:13:49 canard iptables.init: [FAILED] Oct 8 00:13:49 canard systemd: iptables.service: main process exited, code=exited, status=1 Oct 8 00:13:49 canard systemd: Unit iptables.service entered failed state. Oct 8 00:15:11 canard avahi-daemon: Invalid response packet from host 22.214.171.124.
- Join Date
- May 2011
You may want to just trying adding the rule to the running iptables configuration, to see if it works, before writing it to the config file, e.g.:
systemctl stop iptables.service systemctl start iptables.service iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 5903 -j ACCEPT
iptables-save > /etc/sysconfig/iptables
Edit: I forgot - if that doesn't work (or even if it does), you can post the entire contents of /etc/sysconfig/iptables file
Last edited by atreyu; 10-08-2012 at 02:50 AM. Reason: /etc/sysconfig/iptables
One thing to keep in mind is the '-A' appends the rule to the end of the chain. If there are any rules above this that effect the packet are it travels down the chain, i.e., DROP then the packet will never reach this chain.
The adventure of a life time.
Linux User #296285