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 ...


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 ...


23

In the simplest terms, a socket is a pseudo-file that represents a network connection. Once a socket has been created (using the proper primitives, and the proper parameters to identify the other host), writes to the socket are turned into network packets that get sent out, and data received from the network can be read from the socket. In one regard, ...


16

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 ...


15

You're complicating your life needlessly. Use scp. To transfer a file myfile from your local directory to directory /foo/bar on machine otherhost as user user, here's the syntax: scp myfile user@otherhost:/foo/bar. EDIT: It is worth noting that transfer via scp/SSH is encrypted while transfer via netcat or HTTP isn't. So if you are transferring sensitive ...


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 ...


11

As written in the manual page, the /etc/networks file is to describe symbolic names for networks. With network, it is meant the network address with tailing .0 at the end. Only simple Class A, B or C networks are supported. In your example the google-dns entry is wrong. It's not a A,B or C network. It's an ip-address-hostname-relationship therefore it ...


11

This is easy enough to measure, at least if you nmap a host your machine is not otherwise communicating with. Just use tcpdump or wireshark to capture the traffic, limited to that IP address. You could also use iptables counters, etc. I did so (using wireshark), the machine I tested on has fewer open TCP ports (5), but the totals were 2009 packets, 118,474 ...


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

With socat on the server: socat tcp-listen:8001,reuseaddr,fork tcp:localhost:8000


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 ...


8

For static IP situations, the Ubuntu Server Guide says to change the file /etc/network/interfaces, which may look like this: iface eth0 inet static address 192.168.3.3 netmask 255.255.255.0 gateway 192.168.3.1 dns-search example.com dns-nameservers 192.168.3.45 192.168.8.10 You change the IPs 192.168.3.45 192.168.8.10 for the ones you want, like 8.8.8.8 ...


8

I've seen (broken) smart switches going down due to nmap activity, but that was when nmapping a subnet (so ARP traffic for a lot of different endpoints). That may be the kind of problem he's thinking of. Now Intrusion Detection Systems do try and detect port scanning activity and may be configured to block the IP address of the host doing the scanning. If ...


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 ...


7

Try this on when launching qemu -redir tcp:2222::22 $ ssh -p 2222 localhost The tcp:2222::22 flag in the qemu launch command maps the 2222 port of the host machine to port 22 (the default ssh port) on the virtual machine. Then, simply sshing to the 2222 port on your localhost (the host machine) will redirect any traffic into the ssh 22 port in the ...


7

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 ...


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

For tcp, just checking $?. If connection failed, $? won't be 0: $ >/dev/tcp/google.com/81 bash: connect: Network is unreachable bash: /dev/tcp/google.com/81: Network is unreachable $ echo $? 1 It will take time for bash to realize that the connection failed. You can use timeout to trigger bash: $ timeout 1 bash -c '>/dev/tcp/google.com/80' ...


6

The original DHCP specification (RFC 2131 and 2132) defines an option (33) that allows the administrator of the DHCP service to issue static routes to the client if needed. Unfortunately, that original design is flawed these days as it assumes classful network addresses, which is rarely used. The rfc3442-classless-static-routes option allows you to use ...


6

If you're happy with netcat you can work around the file name issue by intruducing tar. This also simplifies sending multiple files at once as well as sending directories. On the sending side use: tar cf - <files> | nc <host> <port> And on the receiving side: nc -l <port> | tar x Another solution would be to use rsync or scp.


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

You can use ifconfig -a or ip a l.


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

Testing IPv4 connectivity If your network lets pings through, try pinging 8.8.8.8 (a server run by Google). if ping -q -c 1 -W 1 8.8.8.8 >/dev/null; then echo "IPv4 is up" else echo "IPv4 is down" fi Testing IP connectivity and DNS If you only want the test to succeed when DNS is also working, use a host name. if ping -q -c 1 -W 1 google.com ...


5

In Linux the selection of source addresses for outgoing connections can be controlled by the routing table: ip route add 10.11.12.0/24 via 10.7.4.1 src 10.7.4.200 This is enough if you just need to use different source addresses for some fixed IP ranges. However, by combining the power of Linux netfilter (iptables) and policy routing (ip rule) you can get ...



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