-
-
Save darlzkrish27/5ee4bec489d4accfd5009dc4a24eae0c to your computer and use it in GitHub Desktop.
centos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| runcmd: | |
| - 'sudo touch /etc/sysconfig/network-scripts/ifcfg-eth1' | |
| write_files: | |
| - content: | | |
| DEVICE=eth1 | |
| TYPE=Ethernet | |
| ONBOOT=yes | |
| BOOTPROTO=dhcp | |
| DEFROUTE=no | |
| PEERDNS=no | |
| PEERROUTES=yes | |
| path: /etc/sysconfig/network-scripts/ifcfg-eth1 | |
| runcmd: | |
| - 'sudo tee -a /etc/iproute2/rt_tables <<< "1 eth1"' | |
| - 'sudo ifup eth1' | |
| - 'sudo ip rule add from 172.16.1.0/24 table eth1' | |
| - 'sudo ip route add default via 172.16.1.1 dev eth1 table eth1' | |
| - 'sudo chmod +x /etc/rc.d/rc.local' | |
| - 'sudo tee -a /etc/rc.d/rc.local <<< "sudo ip rule add from 172.16.1.0/24 table eth1"' | |
| - 'sudo tee -a /etc/rc.d/rc.local <<< "sudo ip route add default via 172.16.1.1 dev eth1 table eth1"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment