3

There are other questions here that are similar but none of the answers have worked for me.

I can successfully enable promiscuous mode for virtualbox settings with my vagrant config using ubuntu with

vb.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]

I can see that the settings have been changed successfully in virtualbox, however in ubuntu, it doesn't appear to be enabled when I execute

ip a

I get

3: enp0s8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0d:13:2a:3a:23 brd ff:ff:ff:ff:ff:ff
    inet 192.168.15.10/24 brd 192.168.92.255 scope global enp0s8
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe1f:5c51/64 scope link 
       valid_lft forever preferred_lft forever

I am using the vagrant image -

config.vm.box = "ubuntu/xenial64"

The host is on macos 10.13.6

1 Answer 1

1

The solution was to also add some config to rc.local. My solution with Ansible was

- name: insert/update block in /etc/rc.local
  blockinfile:
    path: /etc/rc.local
    backup: yes
    content: |
      #promiscuous mode required for routing
      /sbin/ifconfig {{ vpn_nic }} up
      /sbin/ifconfig {{ vpn_nic }} promisc
  when: configure_gateway|bool
  tags:
  - init

- name: execute and check with netstat
  shell: |
    /etc/rc.local
    netstat -i
  register: netstatout
  become: true
  tags:
  - init

- debug:
    msg: "{{ netstatout.stdout }}"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .