Skip to content

Instantly share code, notes, and snippets.

@backroot
Last active November 13, 2019 08:03
Show Gist options
  • Save backroot/24bc5649085954637d3997d2412d411c to your computer and use it in GitHub Desktop.
Save backroot/24bc5649085954637d3997d2412d411c to your computer and use it in GitHub Desktop.
Setup Network for CentOS 7
#!/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