macOS en5 network can't be turned off - macos

I have MacBook Pro 2017, and currently am using High Sierra. I have specific requirement by some software to disable all networks. But this en5 network can't be disabled.
I have removed everything from Networks in network preferences. When I try to disable it through terminal sudo ifconfig en5 down I get ifconfig: down: permission denied.
Few days ago I ran across some article saying I need to change some permits to my sudo user but I can't find that article now :(.
Here are some more info on en5 from terminal
defaults read /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist | grep en5
"BSD Name" = en5;
IOPathMatch = "IOService:/AppleACPIPlatformExpert/PCI0#0/AppleACPIPCI/XHC1#14/XHC1#14000000/HS03#14100000/iBridge#14100000/NCM Data#5/AppleUSBNCMData/en5";
en5: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether ac:de:48:00:11:22
inet6 fe80::aede:48ff:fe00:1122%en5 prefixlen 64 scopeid 0x7
nd6 options=201<PERFORMNUD,DAD>
media: autoselect
status: active
Any Idea how to disable this en5 network?

You cannot disable en5 in your mac probably because you have the touchbar version. en5 is reserved for iBridge interface (used by the touchbar) therefore it's protected and you won't be able to disable it.

Related

Ubuntu wsl2 git getting "The remote end hung up unexpectedly" on large repos

Getting this action for days in Ubuntu 19.04 in wsl2 on Windows.
$ git clone https://github.com/gohugoio/hugo.git
Cloning into 'hugo'...
error: RPC failed; curl 56 GnuTLS recv error (-12): A TLS fatal alert has been received.
fatal: The remote end hung up unexpectedly
I tried recompiling git to use openssl, didn't do anything.
I tried both ssh and https.
I tried to modify git settings for http.
I modified all kinds of git memory settings.
Nothing currently on Stack Overflow is correct for this issue.
I completely reinstalled Windows. Nope, still hosed.
Four days of Whiskey Tango Foxtrot... then I found it.
The latest Windows Hyper-V has issues with your wifi driver. You need to get the latest from https://downloadcenter.intel.com/download/28876/Windows-10-Wi-Fi-Drivers-for-Intel-Wireless-Adapters?v=t
Once the new drivers are installed, you can marvel at how git in wsl2 totally does what it is supposed to. I will never get those 5 days of my life back. I hope this will keep you from losing 5 days of yours.
Here is the issue: https://github.com/microsoft/WSL/issues/4253
Update Nov. 2020: the latest comments on WSL2 4253 point out to:
set MTU to 1350 (same as VPN interface):
sudo ifconfig eth0 mtu 1350
# or
ip link set dev eth0 mtu 1350
Check your MTU:
PS C:\> netsh interface ipv4 show subinterface
MTU MediaSenseState Bytes In Bytes Out Interface
------ --------------- --------- --------- -------------
4294967295 1 0 117945 Loopback Pseudo-Interface 1
1500 1 879583365 308029141 Wi-Fi
...
1500 1 3616963 2778319 vEthernet (WSL)
vs.
➜ ip addr | grep mtu
5: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
A Windows 10 build 20231 might be needed to ensure issue 5821 "WSL vEthernet adapter shows up as disconnected" is fixed.
B. Agustín Amenábar Larraín explains:
Until this issue I never had heard of MTU, and it was hard for me to believe that was the cause, well it is.
I'm having isues when my Pulse Secure VPN is connected and I'm trying to connect to the internal self-hosted Gitlab.
SSH traffic to the regular internet is fine.
I'm using WSL2 Ubuntu 20.04, if I drop it to WSL1, all works as expected (Same for Debian).
Try upgrading your drivers first, that thidn't work for me.
First open a PowerShell prompt and type:
netsh interface ipv4 show subinterface
You will get an output like the following:
MTU MediaSenseState Bytes In Bytes Out Interface
------ --------------- --------- --------- -------------
4294967295 1 0 5974969 Loopback Pseudo-Interface 1
1500 1 2678641808 213293706 Wi-Fi
1500 5 0 0 Local Area Connection* 1
1500 5 0 0 Local Area Connection* 2
1500 1 0 529702 vEthernet (Default Switch)
1300 1 2106 509236 vEthernet (WSL)
1200 1 553027168 20290571 Local Area Connection* 13
1500 1 0 22759124 VirtualBox Host-Only Network #3
1500 5 0 0 Bluetooth Network Connection 4
The key is in the Local Area Connection 13 MTU* (The name and value can change from machine to machine), that is the VPN interface. In my case it's 1200 which is why
set MTU to 1350 (same as VPN interface):
sudo ifconfig eth0 mtu 1350
didn't work for me... and I didn't know how to get the VPN Interface MTU.
(I also hated to install ifconfig which is deprecated in favor of ip).
Now that we know, you can change the VPN MTU from Windows it in a PowerShell with Elevated Privileges,
netsh interface ipv4 set subinterface "Local Area Connection* 13" mtu=1400 store=persistent
If you want to skip the next step, you can set it to 1500, but you are leaving no room for the VPN to wrap the packets, for example I have had trouble with Github because of setting it to 1500.
Then, inside your WSL2 distro, you can check your current MTU values with:
❯ ip addr | grep mtu
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
5: sit0#NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
We care about eth0 (the virtual ethernet connection to Windows), you have to set a matching MTU to where you left it in the previous step.
sudo ip link set eth0 mtu 1400
Sadly both settings get resetted every time you start a new VPN session, or restart the WSL2, or even switch from WLAN to LAN.
Leonardo Oliveira adds:
Your solution to the problem was similar to mine, however I changed the Ethernet MTU inside on my WSL2 to the same numbering I saw in windows power shell (Ethernet WSL), and that way it worked for me.

Monitor Mode on Mac - with Scapy

I am trying to understand what happens when I put on mac in monitor mode. Without the monitor mode, using ifconfig, I find that 'en0' is the active interface. However, in monitor mode, this is what I get:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
nd6 options=1<PERFORMNUD>
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
ether 70:56:81:b9:43:e5
nd6 options=1<PERFORMNUD>
media: autoselect (<unknown type>)
status: inactive
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 32:00:1a:7f:0a:40
media: autoselect <full-duplex>
status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
ether 02:56:81:b9:43:e5
media: autoselect
status: inactive
awdl0: flags=8902<BROADCAST,PROMISC,SIMPLEX,MULTICAST> mtu 1484
ether ee:85:08:e0:ba:17
nd6 options=1<PERFORMNUD>
media: autoselect
status: inactive
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether 72:56:81:9b:d1:00
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 5 priority 0 path cost 0
nd6 options=1<PERFORMNUD>
media: <unknown type>
status: inactive
I am trying to use scapy for sniffing wireless network. So, when I run scapy, it shows iface as 'lo0' and it does not capture any packet. I have looked at a lot of answers regarding this, but most of them are for ubuntu and say that when you put your system in monitor mode, you get 'mon0' interface and then pass this to your scapy and sniff. But in mac, I am not getting anything like the 'mon0', in fact all the interfaces goes inactive in monitor mode. Could some one please help me understand what is happening?
PS: WireShark and Tcpdump work just fine in monitor mode and scapy too captures frames when not in monitor mode. But I am interested in management frames, so I need scapy to capture those on monitor mode. TIA:)
This is an old question, here is the answer:
with older versions of scapy, it simply was not possible
with newer scapy versions (2.4.0+), simply sniff using the monitor argument
sniff([args], monitor=True)
It shows all packets !
I think you're looking for something like this: How can I put mac os x en1 interface into monitor mode to use with python3 scapy?
It is possible, shouldn't be a problem to switch between python3 and python27
I know this is a old question but I had the same problem. I'm unsure as to why en0 appears to be deactivated after running airportd en0 sniff 1 or airport sniff.
To keep the device active while monitoring you can instead use tcpdump.
Example:
$ sudo tcpdump -nnvs0 -I -i en0 -w output.pcap
$ ifconfig
...
en0: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500
ether 60:03:08:a5:fa:0c
inet 192.168.1.33 netmask 0xffffff00 broadcast 192.168.1.255
media: autoselect
status: active
Hope this helps :)

How to Add Virtual Network Interface Mavericks

I like to have a separate virtual network interface on Mavericks, so I can have static IP between the Guest to Host setup of VirtualBox. In xUbuntu, i could do that by updating /etc/network/interfaces:
#The secondary network interface
auto eth1
iface eth1 inet static
address 10.88.12.4
netmask 255.0.0.0
How to do the same in Mac Mavericks? I did try using 'system preferences'->Networks->Actions Menu->Manage Virtual Network Interfaces->Add New VLAN, however, it is giving 'Status: Cable Unplugged'. How to make virtual network interface on Maverick? Thank You
The solution was letting VirtualBox create the virtual network interface by creating "Host Only Network" by going VirtualBox VM -> Preferences -> Network -> Host Only Networks -> Add New and set up the IP/Subnet at that time
Afterwards, check the new virtual network interface by typing "ifconfig" in the command line. It will desiplay something like:
vboxnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 0a:00:27:00:00:00
inet 10.88.12.0 netmask 0xff000000 broadcast 10.255.255.255

OSX Tomcat access via VirtualBox Windows 7

I'm trying to access my Tomcat instance on OSX with Windows 7 via VirtualBox.
My network settings on VirtualBox:
Adapater 1: Bridged Adapter
Name: en1: Wi-Fi (Airport)
Adapter 2: Host-only Adapter
Name: vboxnet0
my ifconfig -a from OSX:
vboxnet0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 0a:00:27:00:00:00
inet 192.168.56.1 netmask 0xffffff00 broadcast 192.168.56.255
I can ping my OSX box from Windows 7, but when I try to visit http://192.168.56.1:8080 I simply get an error that looks like I'm not connected.
Any ideas? Am I missing something in my OSX settings?
edit:
netstat -lan |grep 8080:
tcp46 0 0 *.8080 *.* LISTEN
Problem solved.
Adapter 1: NAT
Adapter 2: Disabled

Can't connect to local IP address on OSX

I'm trying to connect to a webserver that's running on my mac OSX 1.6. I'm able to connect to it locally using http://127.0.0.1:8888/myapp but when I attempt to connect to it using my machine's local IP address (http://192.168.1.15:8888/myapp IP shown below) from the same machine (or another on the network) I cannot connect. I can ping the LAN IP address.
I've tried adding IP forwarding to my router for port 8888 but it didn't help.
I've checked and the OSX firewall is disabled
Can anyone suggest what else is blocking the connection?
Here's what I get when I run ifconfig:
~ :ifconfig
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 127.0.0.1 netmask 0xff000000
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:1f:5b:e8:16:4d
media: autoselect status: inactive
supported media: autoselect 10baseT/UTP <half-duplex> 10baseT/UTP <full-duplex> 10baseT/UTP <full-duplex,hw-loopback> 10baseT/UTP <full-duplex,flow-control> 100baseTX <half-duplex> 100baseTX <full-duplex> 100baseTX <full-duplex,hw-loopback> 100baseTX <full-duplex,flow-control> 1000baseT <full-duplex> 1000baseT <full-duplex,hw-loopback> 1000baseT <full-duplex,flow-control> none
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet6 fe80::21e:c2ff:febf:4809%en1 prefixlen 64 scopeid 0x5
inet 192.168.1.15 netmask 0xffffff00 broadcast 192.168.1.255
ether 00:1e:c2:bf:48:09
media: autoselect status: active
supported media: autoselect
fw0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> mtu 4078
lladdr 00:1f:5b:ff:fe:2b:b3:3c
media: autoselect <full-duplex> status: inactive
supported media: autoselect <full-duplex>
en5: flags=8822<BROADCAST,SMART,SIMPLEX,MULTICAST> mtu 1500
ether 00:1e:c2:8e:0f:45
media: autoselect status: inactive
supported media: none autoselect 10baseT/UTP <half-duplex>
en2: flags=8922<BROADCAST,SMART,PROMISC,SIMPLEX,MULTICAST> mtu 1500
ether 00:1c:42:00:00:00
media: autoselect status: inactive
supported media: autoselect
en3: flags=8922<BROADCAST,SMART,PROMISC,SIMPLEX,MULTICAST> mtu 1500
ether 00:1c:42:00:00:01
media: autoselect status: inactive
supported media: autoselect
Your webserver is probably binding to the loopback interface by default. Applications can "bind" to specific interfaces - if it only listens on the loopback interface, you'll be able to connect via a 127.x.x.x ip but not an external ip. You can look at the "Network Utility" -> Netstat -> display state of all socket connections, which will display all open sockets. Further debugging will require the relevant lines from this (probably the one on port 8888) and potentially what webserver you're running...
This was working fine for me and then it just stopped working all of a sudden. I don't believe I changed anything in my Run/Debug configurations, but maybe I did.
Regardless, the answer is to add the --address=0.0.0.0 parameter to the Run/Debug configuration. To do this:
Right-click your project.
Choose Run As... -> Run Configurations
Make sure your project is selected in the Run Configurations dialog and choose the Arguments tab.
Insert the argument: --address=0.0.0.0
As I said, this was working for me right along and I hadn't set this parameter before that I remember. Anyway, I added it and now things work fine.
TR
Unless this is programming related this question might belong on ServerFault or SuperUser.
In any case, if you are writing an application on Mac OS perhaps you need to specify
the exact interface your application is listening on.
BTW - I think this was user error. I think I was probably running GWT in hosted mode with a Firefox plugin. There was no webserver running or listening to port 8888 which is why it didn't show up!

Resources