SOLVED IPTables not blocking after server restart

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
I just deployed a CentOS 6.5 image on Cloud at Cost and installed Incredible 11.11.1. I've set up TM3 and allowed some of my needed IP's (work, home, lab, etc) and all works well...until I reboot. After a reboot it appears IPTables does not start, or start properly. When rebooted no rules are in place as seen by:
Code:
root@localhost:~ $ iptables -vL
Chain INPUT (policy ACCEPT 374 packets, 25749 bytes)
pkts bytes target    prot opt in    out    source              destination
 
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target    prot opt in    out    source              destination
 
Chain OUTPUT (policy ACCEPT 379 packets, 27542 bytes)
pkts bytes target    prot opt in    out    source              destination
But a quick restart of iptables and I'm back to a full rules list.

So, my question is, what is the easiest way to restart IPTables after a system reboot?

PS: yes, chkconfig confirms IPTables is set to start on boot.
 

tbrummell

Guru
Joined
Jan 8, 2011
Messages
1,275
Reaction score
339
From boot.log:

Code:
                                                          [  OK  ]
ip6tables: Applying firewall rules:                        [  OK  ]
iptables: Applying firewall rules: iptables-restore v1.4.7: host/network `mydomain.net' not found
Error occurred at line: 139
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
                                                          [FAILED]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Determining if ip address 162.248.XXX.XXX is already in use for device eth0...
                                                          [  OK  ]

Looks like we're bringing up iptables before the NIC is up and my FQDN's can't be found....
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,206
Reaction score
5,228
tbrummell: Thanks. Pushed out a fix. Just log out and back in. We added an iptables-restart in /etc/rc.local which is run last in the boot sequence.
 

Members online

No members online now.

Forum statistics

Threads
25,825
Messages
167,849
Members
19,250
Latest member
mark-curtis
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top