Posts

Showing posts with the label Networking

Cannot Remove HyperV VEthernet (Default Switch)

Answer : Use the Hyper-V management console or Device Manager aka. devmgmt.msc to remove virtual NIC. Do not remove NIC via registries You remove virtual switch via PowerShell like it's specified here: https://www.starwindsoftware.com/blog/basic-hyper-v-virtual-nic-management Also as a workaround, you can try these steps. https://social.technet.microsoft.com/Forums/windows/en-US/e49df568-4f4c-47b7-b30c-952d1e26ca58/cant-remove-failed-virtual-switch-from-hypervs-virtual-switch-manager

Capture Only Ssl Handshake With Tcpdump

Answer : I don't know what exactly you are calling handshake, but I propose this command that will probably capture more than 95% of what you can want: tcpdump -ni eth0 "tcp port 443 and (tcp[((tcp[12] & 0xf0) >> 2)] = 0x16)" Now what does it do: eth0 : is my network interface, change it if you need tcp port 443 : I suppose this is the port your server is listening on, change it if you need tcp[((tcp[12] & 0xf0) >> 2)] = 0x16 : a bit more tricky, let's detail this below tcp[12] means capturing the 13th byte of the tcp packet, corresponding to first half being the offset, second half being reserved. The offset, once multiplied by 4 gives the byte count of the TCP header, meaning ((tcp[12] & 0xf0) >> 2) provides the size of the TCP header. The first byte of a TLS packet define the content type. The value 22 (0x16 in hexadecimal) has been defined as being "Handshake" content. As a consequence, tcp[((tcp[12] ...

Capturing Mobile Phone Traffic On Wireshark

Answer : Here are some suggestions: For Android phones, any network : Root your phone, then install tcpdump on it. This app is a tcpdump wrapper that will install tcpdump and enable you to start captures using a GUI. Tip: You will need to make sure you supply the right interface name for the capture and this varies from one device to another, eg -i eth0 or -i tiwlan0 - or use -i any to log all interfaces For Android 4.0+ phones : Android PCAP from Kismet uses the USB OTG interface to support packet capture without requiring root. I haven't tried this app, and there are some restrictions on the type of devices supported (see their page) For Android phones : tPacketCapture uses the Android VPN service to intercept packets and capture them. I have used this app successfully, but it also seems to affect the performance with large traffic volumes (eg video streaming) For IOS 5+ devices, any network : iOS 5 added a remote virtual interface (RVI) facility that lets you use M...

Bridged Vs. NAT: A Virtualbox And VMWare Comparison

Answer : This all looks normal to me. Anything under 10.0.0.0/8 (and also 172.16.0.0/12) are perfectly normal NAT addresses. When you put your VMs in NAT mode, the software is essentially acting as it's own dhcp server for the guest machines and will do translations to the host network, so that all the guests on a particular host share an IP with the host. Anything in any of those ranges are fair game for NAT. It appears that VMWare uses a 192.168.0.0/24 range by default, and VirtualBox uses a 10.0.0.0 range. Both are just fine, and neither is better than the other (though I personally prefer 10.0.0.0 ranges because there are 255 times more addresses available). It sounds like maybe you expected NAT mode to use the NAT between your host network and the internet, but that just doesn't happen. In fact, that is what bridge mode does. Switching to bridged mode means your VM guests are now connected directly to your home router's dhcp server for addresses. VirtualB...

Can Ping IP Address And Nslookup Hostname But Cannot Ping Hostname Temporarily In Windows

Answer : I faced the same problem in my network. When you use this command: ping icecream It uses WINS server since you have used icecream not icecream.my.domain . When looking for such words, Windows looks for NETBIOS names, but when you look for complete domain records, it will look in the DNS server. You can use one of the solutions below: Make sure you have correct records for that station in your WINS server. Use the complete domain name instead of using the host file. E.g. icecream.my.domain You don't have DNS suffixes configured. Either configure them, or use FQDN like this and it should work: ping icecream.my.domain

Can't Connect To PPTP VPN With Ufw Enabled On Ubuntu 14.04 With Kernel 3.18

Answer : This is caused by a change for security reason in kernel 3.18 [1]. There are two ways to fix this. First approach is adding this rule to the file /etc/ufw/before.rules before the line # drop INVALID packets ... -A ufw-before-input -p 47 -j ACCEPT Second approach is manually loading the nf_conntrack_pptp module. You can do this by running sudo modprobe nf_conntrack_pptp To load this module on every boot on Ubuntu, add it to the file /etc/modules . For more recent versions of ufw a solution is instead: sudo ufw allow proto gre from [PPTP gateway IP address] sudo systemctl restart ufw Add nf_conntrack_pptp to /etc/modules-load.d/pptp.conf One liner echo nf_conntrack_pptp | sudo tee /etc/modules-load.d/pptp.conf Explanation The accepted answer works for me, especially the 2nd suggestion--loading the nf_conntrack_pptp kernel module--as opposed to modifying my iptables firewall. My laptop firewall is otherwise unmodified. sudo ufw enable without excepti...

Android Check Internet Connection

Answer : This method checks whether mobile is connected to internet and returns true if connected: private boolean isNetworkConnected() { ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); return cm.getActiveNetworkInfo() != null && cm.getActiveNetworkInfo().isConnected(); } in manifest, <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> Edit: This method actually checks if device is connected to internet(There is a possibility it's connected to a network but not to internet). public boolean isInternetAvailable() { try { InetAddress ipAddr = InetAddress.getByName("google.com"); //You can replace it with your name return !ipAddr.equals(""); } catch (Exception e) { return false; } } Check to make sure it is...

Cannot See Computers On Network

Answer : Network discovery has since always been a painful subject in all versions of Windows, especially now when so many security fixes were applied. I have collected below all the fixes I know. You might try them one by one, undoing the ones which do not help. Homogenous account types All the computers must be logged-on with the same type of account. Meaning that all must have a Microsoft account or a local account, as mixing account types will not work. If you change an account type that has created some network shares, they should be deleted and recreated. Network Reset In PC Settings, Network & Internet Settings, click Network Reset and in the next screen click Reset now. This will reset all network settings, so you may have to recreate any defined VPNs and re-enable settings such as Network Discovery. Computer Browser service broken As described in the Microsoft article SMBv1 is not installed by default in Windows 10 Fall Creators Update 2017 and Windows...

Can I Combine Two Internet Connections Into One PC Using Only A Switch?

Answer : The easiest way to configure this would be to use a Multi-WAN router such as the Linksys RV042. Technically: yes In practice, it's an exotic and expensive configuration. You can put more than one address on an interface or use more than one interface and be multihomed . However, this is much more likely to be effective for a big server cluster in a data center. Expensive routers capable of running routing protocols will be needed and then it still would not help you with a single given TCP connection. If you try this as a single user of two retail ISPs, then you will have two different IP addresses, so incoming traffic will use the one you made the outbound connection on, and it's unlikely that any equipment you have can be configured with more than one gateway. A large site with a /24 or shorter prefix and their own ASN can actually announce a single IP address over multiple networks, but that won't work without being further upstream than a retail...

Bypassing Bell Canada's Router Provided With Their FIBE Service

Answer : Not sure if the question is still relevant, but still wanted to share the result of my investigation.. I just switched from a Cable ISP to Bell Fibe, for both TV and Internet. Bell still don't have Fibre to home in my area, so is is still somewhat a DSL type connection. Bell provided a HUB2000 integrated modem/router. the device is very user friendly, but all advanced network features are blocked.... as expected. I had my entire network already set up as with my previous internet provider (Videotron only provided a cable modem) and i wanted to maintain the same configuration (firewall, IPs, etc).. So this is what I have done: TV receiver is connected via a network cable to the HUB2000 LAN port (as per the original Bell set up) HUB 2000 is connected to the phone line to act as a DSL modem (as per the original set up) WAN port of my MikroTik router is connected to one of the LAN ports of the HUB 2000. Now here is the trick, in my Mikrotik WAN configuration, in...

A Call To SSPI Failed, See Inner Exception - The Local Security Authority Cannot Be Contacted

Answer : This means the other side is using another version of TLS and you are using an older version. Set up security attribute to TLS12 before making the connection. This is a widely known problem, as many providers start using TLS12 (e.g. paypal,amazon and so on). ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; Here is the solution, set in the registry: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\KeyExchangeAlgorithms\Diffie-Hellman] "ClientMinKeyBitLength"=dword:00000200 as noted here If you are using SslStream, then you need to explicitly set the TLS version in the AuthenticateAsClient call, for example: ssl.AuthenticateAsClient(url, null, SslProtocols.Tls12, false);

Can't Get RTL8125B Working On 20.04

Answer : I had the same exact issue. Looks like you're missing drivers for the Ethernet. Go to this link (which is from the actual Ethernet provider): https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-pci-express-software Download the "2.5G Ethernet LINUX driver r8125 for kernel up to 5.6" and follow the installation instructions. You should be able to use wired connection once you're done. The rtl8125b support has been added to the linux-next tree 6 days ago. https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/drivers/net/ethernet/realtek?h=next-20200720&id=0439297be95111cf9ef5ece2091af16d140ce2ef It will take some time to get into stable and then into Ubuntu. You can try to install drivers from the Realtek site before Linux supports it natively. You'll need to disable Secure Boot in BIOS and blacklist r8169 to get them working. The issue is fixed in the 5.9 kern...