Firewall TUI IPTables drop IP

Issues related to configuring your network
Post Reply
ethancedrik
Posts: 4
Joined: 2015/12/08 17:43:55

Firewall TUI IPTables drop IP

Post by ethancedrik » 2015/12/08 18:41:15

Hey, I am running CentOS 6.7 x64 and I encountered an issue with something I want to do. I haven't taken the time to learn IPTables yet, so instead I've been using "system-config-firewall-tui", and I was wondering if there was a way to do "/sbin/iptables -I INPUT -s {IP-HERE} -j DROP" from within it. I'm assuming it would be at this screen
Image but I'm unsure of what to enter here. Would anyone else know how to do this? Or should I just learn how to use IPTables from the command line lol

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Firewall TUI IPTables drop IP

Post by TrevorH » 2015/12/08 22:10:41

I don't believe there is a way to do that from the gui but since you already quoted pretty much the exact command you'd need to run to do what you want, I think your learning curve for iptables itself should be pretty shallow.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

ethancedrik
Posts: 4
Joined: 2015/12/08 17:43:55

Re: Firewall TUI IPTables drop IP

Post by ethancedrik » 2015/12/09 07:23:46

Thanks, the annoying issue was that whenever I made a change in the TUI it would undo any of the dropped IPs I had saved. I will look into spending more time getting all the iptables commands down haha

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Firewall TUI IPTables drop IP

Post by TrevorH » 2015/12/09 09:00:13

You would need to save your running rules after amending them with the iptables command. Make your change, ensure that it works and does what you expect then run service iptables save to save the running rules to /etc/sysconfig/iptables so they are restored in future.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply