UnixGuy wrote: » Well, the RHCE exam is nothing but a real working Red Hat system, so you should test that scenario in your own lab and see how it works So you want to enable the default configuration of the firewall through the GUI and then flush out all the rules using "iptables -F", I don't understand why do you want to enable the default configuration only to flush it out?
sunveer wrote: » So that I can add my own rules without any interference of others.
UnixGuy wrote: » yes but why "enabling the default the configuration from the GUI" to begin with? you can simply disable it, and add your own rules. Firewall will work as long as the service is enabled. (/etc/init.d/iptables )
# service iptables start # chkconfig iptables on # chkconfig iptables --list
UnixGuy wrote: » Start the service:# service iptables start # chkconfig iptables on # chkconfig iptables --list
[root@station1 ~]# /etc/init.d/iptables start Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: filter [ OK ] Unloading iptables modules: [ OK ] Applying iptables firewall rules: [ OK ] Loading additional iptables modules: ip_conntrack_netbios_n[ OK ] [root@station1 ~]#
[root@server1 ~]# /etc/init.d/iptables start [root@server1 ~]# [root@server1 ~]# /etc/init.d/iptables restart [root@server1 ~]#
UnixGuy wrote: » this is strange. can you check "/var/log/messages" and see if anything is logged?
[root@station1 ~]# system-config-securitylevel
[root@station1 ~]# service iptables restart Flushing firewall rules: [ OK ] Setting chains to policy ACCEPT: filter [ OK ] Unloading iptables modules: [ OK ] Applying iptables firewall rules: [ OK ] Loading additional iptables modules: ip_conntrack_netbios_n[ OK ] [root@station1 ~]#
[root@station1 sysconfig]# more /etc/sysconfig/iptables
UnixGuy wrote: » First thing I do ( from a console) is make the default behavior to DROP everything (INPUT/OUTPUT/FORWARD), then I open the services the I want one by one.
[root@cent1 ~]# /etc/init.d/iptables status Table: filter Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 2 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 etc.
[root@cent1 ~]# setup [root@cent1 ~]# /etc/init.d/iptables status iptables: Firewall is not running. [root@cent1 ~]# /etc/init.d/iptables start [root@cent1 ~]# /etc/init.d/iptables status iptables: Firewall is not running.
sunveer wrote: » As I in my first post asked, I enabled firewall in setup and then remove the default rules so that they do not interfere with my services access and then add the custom rules as told in the questions.
W Stewart wrote: » Redhat isn't failing you, you're failing redhat.