Skip to content

Instantly share code, notes, and snippets.

Created August 25, 2015 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/2a64361f862819311069 to your computer and use it in GitHub Desktop.
Save anonymous/2a64361f862819311069 to your computer and use it in GitHub Desktop.
[root@ptcopsawsproxy-1 firewalld]# vi /etc/sysconfig/network-scripts/ifcfg-
ifcfg-inside ifcfg-lo ifcfg-outside
[root@ptcopsawsproxy-1 firewalld]# vi /etc/sysconfig/network-scripts/ifcfg-inside
[root@ptcopsawsproxy-1 firewalld]# vi /etc/sysconfig/network-scripts/ifcfg-outside
[root@ptcopsawsproxy-1 firewalld]#
[root@ptcopsawsproxy-1 firewalld]#
[root@ptcopsawsproxy-1 firewalld]# firewall-cmd --get-active-zones
public
interfaces: ens192 ens224
[root@ptcopsawsproxy-1 firewalld]# systemctl restart firewalld
[root@ptcopsawsproxy-1 firewalld]# firewall-cmd --get-active-zones
public
interfaces: ens192 ens224
[root@ptcopsawsproxy-1 firewalld]# grep -i zone /etc/sysconfig/network-scripts/ifcfg-*
/etc/sysconfig/network-scripts/ifcfg-inside:ZONE=work
/etc/sysconfig/network-scripts/ifcfg-outside:ZONE=public
[root@ptcopsawsproxy-1 firewalld]# firewall-cmd --zone=work --change-interface=ens192
success
[root@ptcopsawsproxy-1 firewalld]# firewall-cmd --zone=work --change-interface=ens192 --permanent
success
[root@ptcopsawsproxy-1 firewalld]# grep -i zone /etc/sysconfig/network-scripts/ifcfg-*
/etc/sysconfig/network-scripts/ifcfg-inside:ZONE=work
/etc/sysconfig/network-scripts/ifcfg-outside:ZONE=public
[root@ptcopsawsproxy-1 firewalld]# firewall-cmd --get-active-zones
work
interfaces: ens192
public
interfaces: ens224
[root@ptcopsawsproxy-1 firewalld]# systemctl restart firewalld
[root@ptcopsawsproxy-1 firewalld]# grep -i zone /etc/sysconfig/network-scripts/ifcfg-*
/etc/sysconfig/network-scripts/ifcfg-inside:ZONE=work
/etc/sysconfig/network-scripts/ifcfg-outside:ZONE=public
[root@ptcopsawsproxy-1 firewalld]# firewall-cmd --get-active-zones
public
interfaces: ens192 ens224
[root@ptcopsawsproxy-1 firewalld]# grep -i zone /etc/sysconfig/network-scripts/ifcfg-*
/etc/sysconfig/network-scripts/ifcfg-inside:ZONE=work
/etc/sysconfig/network-scripts/ifcfg-outside:ZONE=public
[root@ptcopsawsproxy-1 firewalld]# cd /etc/sysconfig/network-scripts/
[root@ptcopsawsproxy-1 network-scripts]# mv ifcfg-
ifcfg-inside ifcfg-lo ifcfg-outside
[root@ptcopsawsproxy-1 network-scripts]# mv ifcfg-inside ifcfg-ens192
[root@ptcopsawsproxy-1 network-scripts]# mv ifcfg-outside ifcfg-ens224
[root@ptcopsawsproxy-1 network-scripts]# firewall-cmd --get-active-zones
public
interfaces: ens192 ens224
[root@ptcopsawsproxy-1 network-scripts]# systemctl restart firewalld
[root@ptcopsawsproxy-1 network-scripts]# firewall-cmd --get-active-zones
public
interfaces: ens192 ens224
[root@ptcopsawsproxy-1 network-scripts]# firewall-cmd --zone=work --change-interface=ens192
success
[root@ptcopsawsproxy-1 network-scripts]# firewall-cmd --zone=work --change-interface=ens192 --permanent
success
[root@ptcopsawsproxy-1 network-scripts]# systemctl restart firewalld
[root@ptcopsawsproxy-1 network-scripts]# firewall-cmd --get-active-zones
public
interfaces: ens192 ens224
[root@ptcopsawsproxy-1 network-scripts]#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment