Hot answers tagged

131

Since the servers are physically next to each other, and you mentioned in the comments you have physical access to them, the fastest way would be to take the hard-drive out of the first computer, place it into the second, and transfer the files over the SATA connection.


67

netcat is great for situations like this where security is not an issue: # on destination machine, create listener on port 9999 nc -l 9999 > /path/to/outfile # on source machine, send to destination:9999 nc destination_host_or_ip 9999 < /dev/sda # or dd if=/dev/sda | nc destination_host_or_ip 9999 Note, if you are using dd from GNU coreutils, you ...


28

Do use fast compression. Whatever your transfer medium - especially for network or usb - you'll be working with data bursts for reads, caches, and writes, and these will not exactly be in sync. Besides the disk firmware, disk caches, and kernel/ram caches, if you can also employ the systems' CPUs in some way to concentrate the amount of data exchanged ...


26

There are several limitations that could be limiting the transfer speed. There is inherent network overhead on a 1Gbps pipe. Usually, this reduces ACTUAL throughput to 900Mbps or less. Then you have to remember that this is bidirectional traffic and you should expect significantly less than 900Mbps down. Even though you're using a "new-ish router" are you ...


20

As noted in previous answer, wondershaper does the job easily. I include the information from above link by Jwalanta Shrestha apt-get install wondershaper wondershaper - An easy tool to limit bandwidth of a particular interface. $ sudo wondershaper {interface} {down} {up} the {down} and {up} are bandwidth in kpbs So for example if you want to limit ...


14

We deal with this regularly. The two main methods we tend to use are: SATA/eSATA/sneakernet Direct NFS mount, then local cp or rsync The first is dependent on whether the drive can be physically relocated. This is not always the case. The second works surprisingly well. Generally we max out a 1gbps connection rather easily with direct NFS mounts. You ...


12

First three octets in a MAC address uniquely identify the manufacturer of the device. Udev rules allow you to match any number of characters with an asterisk. Thus, you can write a generic rule that will match any device of a specific vendor: SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="74:2f:68*", NAME="wlan0" Alternatively, you can stop matching on ...


11

As you have the machine C on the internet, make a special account there named sesame, and on A you make an account with a public/private key from which you have copied the public key to the sesame account on C. You can now login from A to C, but instead of doing that you do: ssh -N -R 19930:localhost:22 sesame@yourserverC ( you might want to combine ...


10

And surely any attacker who could alter the file for malicious purposes could likewise alter the given checksum. Not always. You could have a content link along with a checksum served on HTTPS. The link could be a nonencrypted link -- plain HTTP or FTP, or something else. On the downside, the unencrypted connection can get easily middle-manned, on the ...


9

To detect corruption is not entirely correct. To ascertain the integrity of the software would be a more correct usage. Normally a software is not distributed from a single server. The same software may be distributed from many servers. So when you download a particular software, the server closest to your destination is chosen as the download source to ...


9

In /etc/ssh/sshd_config add the following: AllowUsers remoteUserA@xx.xx.xx.xx remoteUserA@yy.yy.yy.yy userA AllowUsers remoteUserB@zz.zz.zz.zz userB Then restart the SSH daemon. You can use wildcards as described in Patterns section of the ssh_config manual.


8

You can use the smbclient program to give you an FTP-like interface to the Windows file share without having to isntall FTP on the Windows machine. Here follows some examples: Transfer file from local (unix/linux) to Windows: smbclient //server.domain.org/d$ <password> -W domain.org -U <my-user> -c "put file-local.xml ...


8

Yes, you can do this, and it's not even that hard. I have a laptop with a wireless card, and an ethernet port. I plugged a RapberryPi running Arch Linux into it, via a "crossover" ethernet cable. That's one special thing you might need - not all ethernet cards can do a machine-to-machine direct connection. The other tricky part is IP addressing. It's best ...


7

If you specify allow-hotplug eth0 instead of auto eth0 in /etc/network/interfaces, then the connection will only be initiated by udev when something triggers it, instead of at every boot. Hopefully that will be when another device is connected to the other end of your cable...


7

Install a IPv6 tunnel (such as Sixxs) on your Raspberry Pi. You'll now have a permanent static IPv6 address that will come online whenever your Pi is online. Make sure you secure your Pi as it's connected to the world now. If your B is connected to an IPv6 network, then connect directly to the Pi. If B is not connected to an IPv6 network, use C as a jump ...


7

The file is called /etc/hosts.deny, not host.deny Not all services use tcp-wrappers. sshd, for example, doesn't by default. Neither does apache. You can use iptables to block all packets from 117.25.128/24, e.g.: iptables -I INPUT -s 117.25.128.0/24 -j DROP Even better, you can use fail2ban to monitor a log file (such as apache's access.log and/or ...


6

If I understand your problem correctly, you want to ping your computer from another computer. The ping 1.2.3.4 works but the ping hostname doesn't. What I suspect the situation being is that your computer doesn't have a its hostname registered in DNS that is discoverable by the other machine. If the hostname is not known to the other machine it does not ...


6

I think this could work To disable eth0: ifconfig eth0 down To enable eth0: ifconfig eth0 up


6

TCP and UDP are two different protocols on top of IP. The TCP port number is part of the TCP protocol, and the UDP port number part of the UDP protocol. So yes, the two can be used simultaneously, as TCP and UDP are two different protocols, with different protocol numbers (see /etc/protocols). A DNS server can and does listen to both UDP/53 and TCP/53, at ...


6

Congratulations, you've just delved into the concept of networking layers by realizing that ports and protocols are not directly connected with each other. As others are saying, telnet can be used to connect to any TCP port. However to understand why this is possible you need to understand a bit about networking layers. If you've ever heard of the OSI 7 ...


6

You can use ifconfig -a or ip a l.


6

In addition to Tony´s answer, of querying OpenDNS, which I use in my scripts upon logging on to my servers to display both the local machine and remote public IP address: echo `hostname` `hostname -i` `dig +short +time=1 myip.opendns.com @resolver1.opendns.com` Google also offers a similar service. dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | ...


5

Linux has a feature called network namespaces which allow you to essentially have multiple network stacks on the same machine, and assign one to a program when running it. This is a feature typically used for containers, but you can also use it to accomplish what you want. The ip netns subcommands manage it. Creating a new network namespace with no access ...


5

samplerbox.service is started after networking has finished. True, but only an incidental and not what is actually happening. If you look carefully at the graph you'll find that samplerbox.service is being started after basic.target. This is normal and by design in systemd. Most (non-system) services have "default dependencies" set, which are ...


5

You could use nc -l as a method to do what you are looking for. Some implementations of nc have a -L option which allows the connections to persist. If you only need them for a little while you could open this command in a for loop and have a bunch of ports opened that way. If you need these opened longer you can use one of the super servers to create a ...


5

You can use talk or ytalk More info: Talk ytalk Alternatively: You can use netcat, On box1: nc -l 3333 On box2: nc $IP 3333, where $IP equals the local IP address of the first system. Once you do this, in the same box (box2) , type something and press enter. Take a look on your other box. You can also choose a different port and get it opened on ...


5

Edited following OP's clarification on the use case: You can not do that using the latest official release of bash (currently 4.3.30 according to this page). lib/sh/netopen.c shows that bash opens a UDP socket (SOCK_DGRAM) then directly tries to connect without looking at the ip address to determine whether it would make sense to set specific socket options ...


5

dumpcap, the low-level traffic capture program of Wireshark, can be instructed to stop capturing after certain conditions with the option -a. You can stop capturing after writing 60MB. This isn't the same thing as measuring traffic, since it depends on the file encoding, but it should be close enough for most purposes (and anyway the exact traffic depends at ...


5

OK, found it myself. The answer is /proc/sys/net/ipv4/conf/*/rp_filter. The option is documented at the Linux Foundation. While this is an old setting, it seems that Ubuntu changed the default value sometime between 07.04 and 14.04. Changing the value from 1 back to 0 fixed my problem.


5

Using netcat - no unneeded load on your CPU if you're not concerned about privacy (i.e. your home network is yours really) On your host, run cat /dev/sda | nc -n ipaddr 10000 where ipaddr is IP address of your PI On your PI, run nc -l 10000 >/dev/sdc All commands are to be run as root. OpenBSD netcat is assumed to be your nc version there (can be ...



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