Skip to content

Instantly share code, notes, and snippets.

@geokal
Forked from mhtsai1010/promiscuous_mode.txt
Created August 31, 2018 20:50
Show Gist options
  • Save geokal/6c91e412188e12cbfc838b00498ba09d to your computer and use it in GitHub Desktop.
Save geokal/6c91e412188e12cbfc838b00498ba09d to your computer and use it in GitHub Desktop.
Enable promiscuous mode of vmware on a Linux Host
Ref: https://bbs.archlinux.org/viewtopic.php?id=65508
1/ Method 1
# First, create a new Linux group which has permission to use promiscuous mode, and add yourself to the group.
$ groupadd promiscuous
$ usermod -a -G promiscuous <your_user_id>
# Update the group ownership and access permission of /dev/vmnet*
$ chgrp promiscuous /dev/vmnet*
$ chmod g+rw /dev/vmnet*
2/ Method 2
To allow all users (instead of a specific user) to set the virtual adapter to promiscuous mode, run the following command on host machine.
$ chmod a+rw /dev/vmnet*
Above setting is a temporary solution as the reboot will delete changes.
==To make it permanent at each reboot==
# For Method 1 (assuming that you already created a Linux group called "promiscuous" as described earlier):
Find the line vmwareStartVmnet in /etc/init.d/vmware
vmwareStartVmnet() {
vmwareLoadModule $vnet
"$BINDIR"/vmware-networks --start >> $VNETLIB_LOG 2>&1
chgrp promiscuous /dev/vmnet*
chmod g+rw /dev/vmnet*
}
# For Method 2 :
Find the line vmwareStartVmnet in /etc/init.d/vmware, and put the chmod as below :
vmwareStartVmnet()
vmwareLoadModule $vnet
"$BINDIR"/vmware-networks --start >> $VNETLIB_LOG 2>&1
chmod a+rw /dev/vmnet*
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment