Last active
November 13, 2019 08:03
-
-
Save backroot/24bc5649085954637d3997d2412d411c to your computer and use it in GitHub Desktop.
Setup Network for CentOS 7
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
#!/usr/bin/bash | |
nmcli connection modify eth0 ipv4.method manual | |
nmcli connection modify eth1 ipv4.method manual | |
nmcli connection modify eth0 ipv4.addresses "XXX.XXX.XXX.XXX/24" | |
nmcli connection modify eth0 ipv4.gateway "XXX.XXX.XXX.XXX" | |
nmcli connection modify eth1 ipv4.addresses "192.168.0.1/24" | |
nmcli connection down eth0 | |
nmcli connection up eth0 | |
nmcli connection down eth1 | |
nmcli connection up eth1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment