psadmin-io / ps-vagabond

PeopleSoft Image management with Vagrant
MIT License
26 stars 10 forks source link

Linux networking for bridged adapters is not working #72

Closed ostracize closed 6 years ago

ostracize commented 6 years ago

Key line: https://github.com/psadmin-io/ps-vagabond/blob/dd1327632d33552eed7d55c25624a1f36b5d6320/Vagrantfile#L123

I believe the following is the preferred method and will fix the issue, I need to do more testing to be sure:

  config.vm.provision "shell",
          run: "always",
          inline: "ip route delete default 2>&1 >/dev/null || true; ip route add default via #{NETWORK_SETTINGS[:gateway]}"
ostracize commented 6 years ago

This works but a system restart is still required.

Maybe add: nmcli networking off && nmcli networking on

ostracize commented 6 years ago

These commands definitely work. Need to integrate this into the Vagrantfile and test

nmcli conn modify "enp0s3" ipv4.never-default yes
nmcli conn modify "System enp0s8" ipv4.gateway XXX.XXX.XXX.XXX <-- where XXX.XXX.XXX.XXX is the gateway IP
nmcli networking off
nmcli networking on