Tag Info

Hot answers tagged

49

Looking at the RFC for TCP: RFC 793 - Transmission Control Protocol, the answer would seem to be no because of the fact that a TCP header is limited to 16-bits for the source/destination port field.      Does IPv6 improve things? No. Even though IPv6 will give us a much larger IP address space, 32-bit vs. 128-bits, it makes no attempt ...


25

I have drawn some sketches The machine, where the ssh tunnel command is typed is called »your host«. Introduction local: -L Specifies that the given port on the local (client) host is to be forwarded to the given host and port on the remote side. ssh -L sourcePort:forwardToHost:onPort connectToHost means: connect with ssh to connectToHost, and ...


25

Apart from not getting detailed information about your test setup the main problem seems to be, that you use a message size of 64 byte. This is far away from the usual MTU of 1500 bytes and makes UDP highly inefficient: while TCP merges multiple sends into a single packet on the wire (except if TCP_NODELAY is set) to make efficient use of the link, each UDP ...


19

The limit on "open files" is not really just for files. It's a limit on the number of kernel handles a single process can use at one time. Historically, the only thing that programs would typically open a lot of were files, so this became known as a limit on the number of open files. There is a limit to help prevent processes from say, opening a lot of files ...


18

From man 1 traceroute: -m max_ttl Specifies the maximum number of hops (max time-to-live value) traceroute will probe. The default is 30.


15

Setting up a dummy interface If you want to create network interfaces, but lack a physical NIC to back it, you can use the dummy link type. You can read more about them here: iproute2 Wikipedia page. Creating eth10 To make this interface you'd first need to make sure that you have the dummy kernel module loaded. You can do this like so: $ sudo lsmod | ...


13

The kernel lists them by name in /sys, both separately in (e.g.) the tree of PCI devices -- although finding them there if you don't know where they are to start with is not simple -- and together via symlinks in /sys/class/net. E.g.: > ls /sys/class/net em1 lo wlp6so Another example: > ls /sys/class/net lo p6s1 wlan0 If you are not sure which is ...


13

This is one of those things that surprises people because it goes against what they've been taught. 2 machines with the same hardware mac address on the same broadcast domain can talk to each other just fine as long as they have different IP addresses (and the switching gear plays nice). Lets start with a test setup: VM1 $ ip addr show dev enp0s8 3: ...


12

Some (but not all) reasons: In order to host multiple SSL sites as already mentioned Because you may be consolidating services from multiple hosts and you need to preserve the addresses In order to use an IP address that can later be transferred to another host To compensate for a host that's down at that moment by adding its IP address to another one If ...


10

In a screen or tmux session, set up a shell that will reverse your changes after a delay. I don't know anything about iptables, so can't help with that, but something like this has saved my proverbial bacon on numerous occasions while altering live firewall configs on FreeBSD: # In one `screen` or `tmux` window % sleep 60 && <command to reverse ...


10

The reason why TCP/IP sockets use file descriptors is that, when the sockets interface was first designed and implemented (in BSD Unix, in 1983), its designers felt that a network connection was analogous to a file - you can read, write, and close both, and that it would fit well with the Unix idea of "everything is a file". Other TCP/IP network stack ...


9

Method #1 - from NetworkManager's Applet Try disabling the wireless networking under the Network Applet that's accessible from under the icons in the upper right of your desktop. ...


9

When some location is further than 30 hops, it probably means simply that last hops does not replies when TTL exceeds. Unless, it's a story: $ traceroute -m100 216.81.59.173 traceroute to 216.81.59.173 (216.81.59.173), 100 hops max, 52 byte packets (...) 14 episode.iv (206.214.251.1) 173.387 ms 171.638 ms 171.201 ms 15 a.new.hope (206.214.251.6) ...


8

I had exactly the same problem. Have you killed the dhcpd? I completely killed dhcpd: $ sudo killall dhcpcd After I disabled my wireless interface ($ ip link set down $ should work too): $ sudo ifconfig wlp3s0 down and my wifi-menu is working again.


8

Look at the output of the last command and anything with an IP address or hostname instead of a blank space came in over the network. If sshd is the only way of doing that on this system, then there you go. Alternatively (if this is Linux), you can check /var/log/secure where sshd will usually keep track of connections made even if they don't result in ...


8

Yes it's entirely possible that your firewall is blocking the traceroute from being successful. To understand why this is failing it's best to consult the traceroute man page. excerpt This program attempts to trace the route an IP packet would follow to some internet host by launching probe packets with a small ttl (time to live) then listening for an ...


8

The simplest method I know to list all of your interfaces is ifconfig -a EDIT If you're on a system where that has been made obsolete, you can use ip link show


8

That's a change in how now udevd assigns names to ethernet devices. Now your devices use the "Predictable Interface Names", which are based on (and quoting the sources): firmware/bios-provided index numbers for on-board devices firmware-provided pci-express hotplug slot index number physical/geographical location of the hardware the interface's MAC address ...


8

Your path looks ok, but does not include /sbin, which may be intended. You were probably looking for the command /sbin/ifconfig. If this file does not exist (try ls /sbin/ifconfig), the command may just be not installed. It is part of the package net-tools, which is not installed by default, because it's deprecated and superseeded by the command ip ...


8

The 2 methods I've seen used predominately are to use ethtool or to manually parse the contents of /sys. ethtool For example if your interface is eth0 you can query it using ethtool and then parse for the line, "Link detected". Example $ sudo ethtool eth0 Settings for eth0: Supported ports: [ TP ] Supported link modes: 10baseT/Half 10baseT/Full ...


7

Assuming I'm reading correctly, your problem isn't that you want to know how to change the IP address, it's that you want to prevent changing it to something that stops future access. This isn't necessarily a technical problem, it's a quality issue. However, you might try something like this (you'll need to work out how to achieve it in detail). Write a ...


7

You should be able to find all open ports in /proc/net/tcp and /proc/net/udp. Each of those files have an inode column, which can be used to find the process owning that socket. Once you have an inode number, you can run an ls command such as ls -l /proc/*/fd/* | grep socket:.$INODE to find the processes using that socket. In case a process has been set up ...


7

You can use a modified version of this script to do what you want: #!/bin/bash downTime=0 lastAccessTime=$(date +"%s") while [ true ]; do if ! ping -c1 google.com >& /dev/null; then downTime=$(( $(date +"%s") - $lastAccessTime )) else downTime=0 lastAccessTime=$(date +"%s") fi sleep 15 if [ $downTime -ge 300 ]; then echo "alert" fi ...


7

you want tcpdump not nc, and the syntax would be tcpdump -i eth0 netcat is only for basic TCP/IP testing. tcpdump utilizes the libpcap library which allows for lowlevel interactions with packets and the likes


6

My solution is to bind to port 0, which asks the kernel to allocate a port from it's ip_local_port_range. Then, close the socket and use that port number in your configuration. This works because the kernel doesn't seem to reuse port numbers until it absolutely has to. Subsequent binds to port 0 will allocate a different port number. Python code: import ...


6

That's probably because a switch only sends traffic down a port if it believes the destination MAC address is attached to that port. On a managed switch, you'd set up monitor mode. On an unmanaged switch, you're left with a couple of options: ARP spoofing, to trick the rest of the network about which MAC address corresponds to the target IP address. You ...


6

Background When you're attempting to use nc in this manner it's continuing to keep the TCP port open, waiting for the destination to acknowledge the receiving of the done request. This is highlighted in the TCP article on Wikipedia. TIME-WAIT (either server or client) represents waiting for enough time to pass to be sure the remote TCP received the ...


6

So as per my understanding, the firewall of my school network is blocking my server from contacting the outside world. Is this correct? No, I guess it can block almost all traffic but allow at least TCP port 80. traceroute in Linux default use UDP, ping use ICMP, so as your output, it seems that those traffic have been blocked by the firewall. How ...


6

Well, lets separate into pieces, to make it more easier to understand /etc/network/interfaces: Link layer options(and generally the first of each interface Stanza): auto <interface> - Start the interface(s) at boot. That´s why lo interface uses this kind of linking configuration. allow-auto <interface> - Same as auto allow-hotplug ...


6

Network interfaces can have different names on Linux depending on their type (wired Ethernet, Wi-Fi, PPP, SLIP, etc.), PCI slot, initialization order, etc. For example if a computer has a single Ethernet card, its name would be eth0*. In your case, there's a virtual private server without an Ethernet network card in it, not even an emulated one. ...



Only top voted, non community-wiki answers of a minimum length are eligible