New answers tagged

1

You have a host-only adapter, which only allows communication within the subnet it is attached to. Host only adapters don't have a gateway, so you won't be able to ping it. If you are looking to communicate with the rest of the internet from that VM, you will need to connect an additional network adapter and choose "NAT" or "Bridged" mode. Good luck, you'...


0

In the end I used this service definition in file /etc/systemd/system/ipres.service: [Unit] Description=ipres Wants=network-online.target After=network.target auditd.service ConditionPathExists=/etc/mypath [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/local/bin/my.program load ExecStop=/usr/local/bin/my.program save [Install] ...


0

Does the command work manually on your server and did you enable the service by using: systemctl enable < your service name >.service I have tried your servicefile on ubuntu 16.04 and 18.04 with default installation and everything seems to work ;)


3

Name resolution, amongst other things, is managed by /etc/nsswitch.conf. Here is an excerpt: passwd: files sss shadow: files sss group: files sss hosts: files dns myhostname (...) Note the hosts line. It says: "When resolving a hostname, first read /etc/hosts file to lookup the hostname, if not found then run a DNS query, if not found ...


2

The magic is opening the /etc/hosts file and reading it: strace -e trace=file wget -O /dev/null http://www.google.com http://www.facebook.com http://unix.stackexchange.com 2>&1 | grep hosts open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 4 open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 5 open("/etc/hosts", O_RDONLY|O_CLOEXEC) = 4 The getaddrinfo(3) function, ...


4

you can not specify the source port for ssh client. but you can use nc as a proxy, like this: ssh -p 33101 -o 'ProxyCommand nc -p 33101 %h %p' $SERVER_2 refer: https://serverfault.com/questions/920007/how-can-i-set-the-source-port-for-ssh-on-unbuntu-server


0

Because I can't know for sure now, I would test using network namespaces if it's possible to use the failover IPs without effect on the "main" IP. I can improve this answer depending on results: I suspect ARP issues caused by "ARP flux" (ie when one interface answers an ARP request on behalf of an other) because of the multiple interfaces on the same LAN. ...


0

Use a virtual interface such as br1:0 to add a "second" interface. A rough example would be something like this: auto br1:0 iface br1:0 inet static address x.x.x.x network x.x.x.x netmask x.x.x.x broadcast x.x.x.x gateway x.x.x.x bridge_ports eno1 bridge_stp off bridge_fd 0 ...


0

Archlinux says, try dhcpcd in case your installer can't connect automatically. This worked on the spot for me AFTER installation. Just type "dhcpcd" as a command, wait a few seconds, and then "ip route" or "ping 8.8.8.8" to check if it works. I even used "watch ip address" to see how fast these inet and inet6 addresses pop up. Instead of using dhcpcd, I ...


0

The "physical layer" used for WLAN is more complicated than you think, it's actually several layers. Out of the box, without hacking and modifying the firmware of a specific card, the lowest you can get is to capture packets with 802.11 headers, by enabling "monitor mode" in that driver (which usually will give you a second WLAN interface). Wireshark can ...


0

Here is a Firefox addon / Chrome extension that allows you to save your current page. with Ctrl+S. in a HTML file. This would work well, but would require a pressing something every page. There is also a Chrome extension that POSTs all of the pages you visit to your local webserver (if you don't have one you'll need to set one up). This would take more time ...


3

Very unlikely to be an Ubuntu problem. Before you wonder, the fact that it connects at 100Mbs instead of 1GBs is normal, many PLC adapters only have 100Mbs ports. It is very likely a matter of PLC signal scrambled by something else, which could be the power unit of your laptop: Try connecting by ethernet directly Unplug at least momentarily all ...


0

General advice, because similar questions get asked regularly: Try to have a single subnet for your house, it will simplify things considerable. There should be a single piece of equipment that acts as DHCP server, DNS proxy etc. This can either be the ISP's router, or, if the ISP's router can't be configured for what is necessary, one of your own routers. ...


0

By definition, a loopback interface is accessible only from the local host. Are you sure that you have a static route to the remote loopback interface or is it possible that you're actually pinging the loopback on you localhost?


0

According to this answer, it should be possible with dhcp4-overrides, however that is not supported in Ubuntu as of 18.04. My workaround was to create a hook script in /etc/networkd-dispatcher/routable.d/ to remove the default route: #!/bin/sh # Only remove the default route on the second interface, e.g. eth1 [ "$IFACE" != eth1 ] && exit 0 # ...


0

Tools are available now that may not have been when the question was asked 2+ years ago. This may not be exactly what OP was asking for either, but it could be valuable for other readers. You may want to consider tlog and the cockpit-session-recording package. Red Hat seems to be promoting these tools with RHEL8.


1

In my case, I installed two CentOS virtual machine by using VMware Player (Host OS: CentOS7). I found no IP address for both of virtual machines. The IP address set by following the below procedures. Check the current connection on your VM: # nmcli con show NAME UUID TYPE DEVICE ens33 xxxxxx ethernet --- The network is not ...


3

The MASQUERADE rule happens at POSTROUTING: that is after a routing decision was already made and a destination interface was already chosen. To communicate with outside, the host will use 192.168.117.1 via eno1. So the MASQUERADE rule criteria should be when using the output interface eno1 rather than br0vm. You should thus have used: iptables -t nat -A ...


0

After reading the 1st half, I wondered were you connecting from outside. Is the server on a private network (e.g. 192.168.x.x), is there a NATing router involved. May be the router is changing the address. My router does not do this on ingress ports. It only re-writes the source address. So changing router may help.


-1

I had a similar problem that by the time I had played the 10,000 moneys scene was exactly this, and I had been trying to add the missing stuff to /e/n/i.d/etho But studying the man page for interfaces, I noted that ALL of the set of examples had only 2 lines of real data, the ipv4 address/24, and a gateway line specifying the address of my router. So I ...


0

According to https://www.spinics.net/lists/netdev/msg352495.html the correct syntax for the v2 cgroup is: iptables -A OUTPUT -m cgroup ! --path test -j LOG


6

I would suggest using GNU Parallel parallel -u ping ::: host1 host2 host3 output will be interleaved


2

By using the common xargs command to build an execute multiple ping requests: echo host1 host2 host3 | xargs -n1 -P0 ping -c 4 Where host1 host2 host3 can be a variable number of hosts (any combination of IP or hostname). This alters the xargs defaults to force 1 input argument per ping execution, and allow an unlimited number of parallel child processes (...


2

Nmap supports ping scans (ICMP) and multiple hosts: nmap -sn -n 127.0.0.1 8.8.8.8 You can also create a file containing all of your target IPs (separated by spaces or newlines) called targets.txt. Then run: nmap -sn -n -iL targets.txt Options explained: -sn Ping Scan. -n Disable DNS resolution. -iL Input file name. Other interesting options in case you ...


0

ping google.com && ping localhost Output Pinging google.com [xxxxxxx] with 32 bytes of data: Reply from xxxxxxx: bytes=32 time=210ms TTL=49 Reply from ::1: time<1ms Reply from xxxxxxx: bytes=32 time=212ms TTL=49 Reply from ::1: time<1ms Reply from xxxxxxx: bytes=32 time=211ms TTL=49 Reply from ::1: time<1ms


0

As far as I can see, a single udhcpd will only serve one network interface at a time, so you'll need to run a second copy of it with a separate configuration file whenever you want it to serve DHCP on eth0 too. That might be called /etc/udhcpd-eth0.conf. You might also need two copies of /etc/network/interfaces at a separate location, one with the "DHCP ...


2

I suppose this can do for you ? eval $(printf 'ping "%s" & ' host1 host2 host3) It takes advantage of printf's ability to "auto-iterate" its arguments while re-using its format string over each argument. The above printf therefore produces a sequence of ping <hostname> & strings for each host provided as argument, and feeds such sequence of ...


0

2 things come to mind. Wouldn't they need your password to gain access to the contents of your laptop? You might also consider MAC (address) filtering as an alternative to password/wep/... exchanges. IOW whitelist filtering against select MAC addresses. Tho 2 assumes you are in control of the WiFi portal/server. In the end IMHO I think not having access to ...


9

oping host1 host2 host3 Description: oping uses ICMP packages (better known as "ping packets") to test the reachability of network hosts. It supports pinging multiple hosts in parallel using IPv4 and/or IPv6 transparently. This package contains two command line applications: "oping" is a replacement for tools like ping(1), ping6(1) and fping(1). "...


1

I do not know what you want exactly but you could change the last 8 bit-set into the decimal 255, so your hosts will receive a broadcast, actually,it will transmit ping packets to all devices that exist in a network. ping -c 1 xx.xx.xx.255


0

There are lots of such tools, e.g. wireshark - a free application that enables you to catch and view the information going forward and backward on your system, giving the capacity to bore down and read the substance of every parcel – separated to meet your particular needs. It is generally used to investigate arrange issues and additionally to create and ...


-1

Just for fun and profit... #!/bin/sh - # sends six "pings" to a list of hosts defined in "hosts" below hosts=" host.a host.b host.c host.d host.e " for p in $hosts do # ONLY CHOOSE ONE OF THE FOLLOWING, NOT BOTH # dump results to file ping -c 6 $p >>./PINGED # dump output to console ping -c 6 $p done exit This could be easily enhanced. ...


17

fping is in a Fedora package of the same name, and allows for many hosts, or a set of ip addressses. $ fping -a -A -c 1 hosta hostb 192.168.0.20 : xmt/rcv/%loss = 1/1/0%, min/avg/max = 0.64/0.64/0.64 192.168.1.3 : xmt/rcv/%loss = 1/1/0%, min/avg/max = 0.50/0.50/0.50 fping will send out a ping packet and move on to the next target in a round-robin ...


6

I know it's specifically not what you are asking for, but a bash script to accomplish this: #!/bin/bash for host; do ping -c5 "$host" 2>&1 | tail -3 & done wait This will take your endpoints as command line arguments and send a 5 count ping to each one as a background process and then wait for all to finish before exiting. It will print ...


30

If you look into the NMAP project you'll find that it includes additional tools on top of just nmap. One of these tools is nping, which includes the following ability: Nping has a very flexible and powerful command-line interface that grants users full control over generated packets. Nping's features include: Custom TCP, UDP, ICMP and ARP ...


1

Here's how a switch works: The switch has several network ports, and those are connected point-to-point to a NIC on a computer. If the NIC can do 25 GB/s, that means that the point-to-point connection will use a protocol that does 25 GB/s. Now with a dumb switch, that would also mean that the incoming connection routed to that NIC is restricted to 25 GB/s. ...


0

As far as I know those are not logged. Unless somebody else proves me wrong, here's an alternate method. What you can do instead is steps 1+2 or 1+3 below: disable rp_filter completely. use iptables' rpfilter match module, once with the LOG target for simple log, or NFLOG (or even NFQUEUE though that's not the intended usage) for full packet dump, and once ...


0

What about a: iptables -I INPUT -p tcp --dport 80 -j ACCEPT This is just for testing purposes, not meant to be in production, but if webserver is reachable after this, then it's a firewall issue for sure.


0

I really recommend launching a xterm in the network namespace with ip netns exec ..., it saves a lot of typing. As you can see with ip -n net1 link list, the network interfaces in the namespace are macvlan1 (and lo). So would you need to do is ip -n net1 addr add 192.168.65.100/24 dev macvlan1 (before you do a link set macvlan1 up on it). Note that this ...


0

You haven't got an ACCEPT rule in the firewall's INPUT chain (or its children) for traffic coming in on port 80. There is a fall-back rule of REJECT which is what's being hit. If you're using ufw you need to add a rule to allow inbound tcp/80 traffic. Unfortunately since I don't use ufw myself (I'm a shorewall person) I can't give you the precise syntax. (I ...


0

I figured it out. Command works when I used IP address instead server name. sudo mount -t cifs //0.0.0.0/shared /mnt/myfolder -o user="username"


0

Try ading iptables rules: -A POSTROUTING -s 10.1.0/24 -o vmbr0 -j SNAT --to-source 148.251.79.108 -A POSTROUTING -s 192.168.10.0/24 -o vmbr0 -j MASQUERADE


0

For SSH access, just limit the SSHD to a certain address. There should be a line like: #ListenAddress 0.0.0.0 in you SSHD config file, probably /etc/ssh/sshd_config. Change 0.0.0.0 to your VPN server's VPN IP, uncomment the line, save the file, relaod SSHD and there you go. For services other than SSH, you have to do a similar thing with them. Using ...


2

You cannot "upgrade" an already running shell. You can however a) create a pty and run another shell in it with script /dev/null b) fiddle with your local terminal so it doesn't intepret the intr, eof, eol and other keys specially, but pass them through. $ nc -lvp 9999 Listening on [0.0.0.0] (family 0, port 9999) [ncat -4 localhost 9999 -e /bin/bash ...


1

Your packet trace shows you're querying the wrong host. ping 192.168.100.10 This is correct, inasmuch as it references host 192.168.100.10: 10:47:58.008033 IP 192.168.100.102 > 192.168.100.10: ICMP echo request, id 30744, seq 1, length 64 10:47:58.008323 IP 192.168.100.10 > 192.168.100.102: ICMP echo reply, id 30744, seq 1, length 64 dig type=soa @...


2

There's the -F option to nc: -F Pass the first connected socket using sendmsg(2) to stdout and exit. This is useful in conjunction with -X to have nc perform connection setup with a proxy but then leave the rest of the connection to another program (e.g. ssh(1) using the ssh_config(5) ProxyUseFdpass option). I guess you could use it along this line: ...


1

Since 1.1.2.1 is an other IP address belonging to the same system, there is no forwarding involved. The system received a packet and handled it for itself, as an incoming packet for local delivery rather than a packet to be routed to a 3rd party. This goes along with the general idea that on Linux IPs should be considered as part of a pool rather than ...


0

You can permanently disable a network interface using systemd. For example if you want to disable wlan0: $ systemctl | grep wlan0 sys-devices-platform-soc-XXX.auto-net-wlan0.device loaded active plugged /sys/devices/platform/soc/XXX.auto/net/wlan0 sys-subsystem-net-devices-wlan0.device loaded active plugged /sys/subsystem/net/devices/wlan0 ...


1

Cloudwatch shows REJECT OK from the IP address of V to that of M. That means your VPC is blocking traffic from V to M and this traffic was blocked by NACLs or a Security Group. That log entry you quoted should tell you the network interface on which that traffic was blocked. Refer to this documentation for more information on how to read VPC Flow Logs. You ...


1

Issue was due to a faulty iptables nat rule. Chain POSTROUTING (policy ACCEPT) target prot opt source destination MASQUERADE all -- 0.0.0.0/0 0.0.0.0/0 Changed the destination to the IP it was intended for and ntp started working. Chain POSTROUTING (policy ACCEPT) target prot opt source destination ...


Top 50 recent answers are included