New answers tagged

0

Finding this wasn't easy (but fun :)). Short answer gethostbyname2(), which uses __lookup_name(), has some hard-coded values for the loopback ('lo') interface. When you specify 'localhost' to the 'getent hosts' command it ends up using the default value for IPv6 before it tries IPv4, thus you end up with ::1. You can change the code of getent in order to ...


0

For my setup I used dhclient to release the IP address. I used the -r option followed by the interface name. sudo dhclient -r enp0s3 Then to get the new IP just executed sudo dhclient without any options. Please note that my clones were built using their own MAC address, which is an option when building your clones.


0

Not exactly what you need, however: You may expose host1 or host2 reversed local port as an external port using iptables. So let's say you connected your host2 as ssh reversed tunnel: user2@host2 $ ssh -R 9999:localhost:22 user@aws.com Now you may forward the incoming port aws.com:9999 to aws [localport:9999]: On AWS server: awsuser@aws.com # iptables -t ...


1

OVH configuration is actually quite simple, and is the same for IPv4 and IPv6: You apply the given IPv4 address with a /32 prefix length, or the given IPv6 address with a /64 prefix length, to the network interface, statically. You set the default IPv4 and IPv6 gateways to the IPv4/IPv6 addresses that OVH specifies, which are determined in predictable and ...


0

Naturally I don't know your exact setup, but I think two things are going on here. My setup is similar to yours in that I have a native (untagged) VLAN with subnet 192.168.1.0/24 and VLAN20 running on the same interface with subnet 192.168.2.0/24. Firstly the 169.254.243.53 address is an automatically-assigned link local address. I've disabled this on mine ...


0

If port forwarding is not an option, the only thing I can think of is SSH remote port forwarding, which is fairly straightforward. ssh -R <PORT_ON_VPS>:127.0.0.1:<PORT_ON_HOME_SERVER> <VPS_IP> So, for example, if you run a web server on your home server on port 80, and would like that to be accessible via the VPS, you could connect to ...


0

First of all, I think you have a mistake in the sysctl fields names as they should start with 'net' and not with 'sys', like so: net.ipv4.tcp_congestion_control = agilesd net.ipv4.tcp_fin_timeout = 20 net.ipv4.tcp_sack = 0 Besides that, from what I can tell the file '/etc/sysctl.d/99-sysctl.conf' is actually a symbolic link to '/etc/sysctl.conf': $ll /etc/...


1

From https://en.wikipedia.org/wiki/Maximum_transmission_unit#Applicability -- "with Ethernet, the maximum frame size is 1518 bytes, 18 bytes of which are overhead (header and FCS), resulting in an MTU of 1500 bytes."


0

Since i could see the packets come in looked into the guest iptables to see what was going on, turns out it was dropping all traffic. Added a simple rule to it and now i can ssh, hopefully this helps someone else. iptables -A INPUT -p tcp --dport 2222 -j ACCEPT


1

Yes, it is possible. At least Linux allows you to run two separate networks on the same physical network. On IPv6 this is in fact standard procedure, with a global address and a link local address assigned to each node on the network. But it works using IPv4, too.


1

A road junction between two roads, needs to be on both roads. They can be on the same physical network (or not). In ether case, you need a bridge/gateway/router between the two logical networks. This gateway has to be on both networks, physically and logically(so have an address on both), and configured as a router. And every device on the two networks ...


0

I managed to get my FreeBSD box connected to Pulse Secure via a combination of a rather recent version of OpenConnect and a handy Python package. The juniper-vpn-py package requires Python2 and a handful of dependencies (listed in its requirements.txt file). You'll know you've met them if you're able to do python2.7 juniper-vpn.py and get back the minimal ...


1

Ordinarily you would have iptables rules like this: # define standard chains and default behaviour (here ACCEPT, could be DROP) :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] # everything as a continuation is OK, This will be the bulk => 1st rule -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT # drop garbage packages -A ...


0

Tried with Below script worked fine for i in host1 host2; do timeout 10 ssh -o 'StrictHostKeyChecking no' $i -A "exit" if [[ $? == 0 ]] then echo "host $i is sshable" ssh -o 'StrictHostKeyChecking no' $i -A <<'EOF' k=`hostname` netstat -altnp| awk '$0 ~ /LISTEN|ESTABLISHED/'| awk '{print $4}'| awk -F ":" '{print $NF}'| awk '{if(!seen[$1]++)print $0}...


1

From Nmap documentation portal: Note that to scan both UDP and TCP, you have to specify -sU and at least one TCP scan type (such as -sS, -sF, or -sT). If no protocol qualifier is given, the port numbers are added to all protocol lists. So you can use: nmap --open -sT -sU -p T:22,25,53,80,111,443,465,587,953,993,995,3306,5666,8891,U:53,68,111,323,715 13....


0

I had the same issue with my vpn. This is what worked for me: Change dns-search in /etc/NetworkManager/system-connections/ Restart NetworkManager. systemctl restart NetworkManager.service Activate vpn systemd-resolve --status I assume the config files are loaded when the NetworkManager service starts and not when you start your vpn connection.


0

This script worked for single port scan if timeout 5 bash -c '</dev/tcp/kernel.org/443 &>/dev/null' then echo "Port is open" else echo "Port is closed" fi I'm not sure if 1 second is too fast to catch an open port but here is the full range of ports. #!/bin/bash for PORT in {1..65535}; do timeout 1 bash -c "</dev/tcp/45.62.xxx.xxx/$PORT &...


0

You need to enable IP forwarding (routing) on your VPN server host, if you want your VPN to communicate with other hosts through the VPN server host: sysctl -w net.ipv4.ip_forward=1 See this answer.


2

Since you’re using Debian, if your repositories are set up correctly (and they are by default), apt-get source ftpd will download and extract the source code for your ftpd package in a sub-directory of the current directory — on Debian 9, that will be ftpd-0.17-36. This works for any package downloaded from the Debian repositories, as long as the ...


1

It seems your targets live on a different network. You are told that 10.1.0.1 is gateway, as it doesn't give the target's (IPs 10.101.x.x) MAC addresses, they are probably on a different network. Having addresses from 10.1.0.1 to 10.101.0.0 would mean some 600 thousand machines on a network... Find out what the network setup is (network masks, routers, ...)....


1

I see in your arp -a command output is shows a 10.1.0 address and your ping has a 10.101.2 they are on different networks. arp will be for the local network you are on. Now ip neigh is the new arp -a and has the same behaviour. You will have to get on that subnet to see the mac and subnet info from those computers. Can you ssh into it? If so you can send ...


0

In the tutorial you posted it mentions: If you do not set the “dev” attribute to either the physical network device or bridge, then you will get unexpected behavior because it may take shortcuts and forward traffic directly from one KVM network to another using internal interfaces. This seems to be what would cause your issue. change: <...


0

Have you tried using a provisioning file? Here is a minimal example for /var/lib/connman/default.config: [service_eth0] Type = ethernet IPv4 = 10.0.10.0/255.255.0.0 Connman should use this configuration, if there's none available in /var/lib/connman/ethernet*. You can find more details and examples in the connman manpages, e.g. https://www.mankier.com/5/...


0

The desktop machine has an address in the IPv4 10.0.0.0 private address range, it just isn't publicly visible (unless whoever manages NAT for your network sets it up specially). See if you have some sort of VPN access.


0

Solution found, this line nmcli connection modify team0 ethernet.mac-address 01:02:03:04:05:06 make the system a little confused and rename the enp1s0(physical) to team0(virtual). Removing this line and redoing the other works fine even on reboot, to get the same ip from dhcp I use this configuration way host myhost { hardware ethernet 00:00:00:00:00:00; ...


2

Add the -p option to ss, it will list the processes using the ports: ss -ultnp To see all processes, you’ll need to run it as root: sudo ss -ultnp


2

Perhaps use netcat(1) (command is nc) to listen on the ports of interest (it isn't called the swiss army knife of networking for nothing). If any ports are below 1024, you'd need to run it as root.


1

xenA: Your previous server xenB: Your new server Step1: Boot both server with a live linux dist(Ubuntu,Fedaora, CentOS) Step2: Start ssh service in your new server Step3: In xenA execute the command below dd if=/dev/sdX bs=16M | pv | ssh user@xenB dd of=/dev/sdX Where X represents the local disks attached to the servers. You can find them wiht "lsblk"...


0

Today I connected to Hamachi network on RaspberryPi 3 with system ubuntu server 18.04.04 LTS, I needed steps described belowe to join network: Start server: sudo /etc/init.d/logmein-hamachi start Then setup nickname: sudo hamachi set-nick raspberry Then login sucesfully: sudo hamachi login After that I've connected to account: sudo hamachi attach '...


1

Ok, so I got it working now. What helped was: Getting rid of br0. I had to remove it manually in /etc/network/interfaces. I thought I need this for my kvm-machine, but it turns out: It was not necessary. My /etc/network/interfaces looks like this now: # interfaces(5) file used by ifup(8) and ifdown(8) auto lo eno1 iface lo inet loopback iface eno1 inet ...


3

It all depends on your routing table. Type ip route or route -n If you have not messed up with the route, for your questions the answers would be: For 192.168.0.100, network A will be used because it is on the same subnet. For 10.31.17.25, it is impossible to tell. Routing table will tell you, which device is used as a default gateway device. Lets take ...


0

I don't think I can give you a complete answer, just something to investigate... This doesn't look to me like your configuration is being ignored, it looks like it's being overwritten by something. IPv6 addresses starting FDxx:: are local address IPs. Typically un-configured interfaces will have a link local address (beginning FE80::) as well as other ...


0

What is wrong with your config file is not clear for me. But, using CenOS 8, a suitable setting to help you could be to use NetworkManager, since network scripts are deprecated: RHEL 8 Deprecated Network Scripts setting connection.autoconnect property to true.


0

The 2015 apple mac laptops use a Broadcom Inc. and subsidiaries BCM43602 network card. The reason it won't work on linux is because the Broadcom drivers would require a firmware update and the process for doing that is apparently quite time consuming and expensive - simply put; Fixing this issue is not worth Broadcom's time. As a prerequisite, in case you ...


0

Ok, figured it out. If I would like to redirect traffic from 192.168.86.30:80 to 192.168.86.30:8084 for a container with an ip address 172.17.0.2 then you can add the following rule: sudo iptables -t nat -A PREROUTING --protocol tcp --destination 192.168.86.30 \ --dport 80 --source 172.17.0.2 \ --jump DNAT --to-destination 192.168.86.30:8084 This ...


2

I won't try to answer your entire question, but I've found a few things that helped me understand how these systems fit together. Hope this helps someone as this was very confusing to me 1 - The old network interfaces configuration file, and it's ifup & ifdown commands: The /etc/network/interfaces network configuration file seems to be fairly old, but ...


0

The instructions at https://wiki.debian.org/WiFi/HowToUse#wpa_supplicant are a bit unprecise and possibly misleading, but if you drop the contents of /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf similar to the shown below, it should work without any troubles. # This file describes the network interfaces available on your system # and ...


1

There’s no equivalence, packets vary in size depending on their contents. You can only get minimum and maximum sizes; for example, Ethernet frames can occupy between 72 and 1530 octets (ignoring jumbo frames), so n packets on an Ethernet interface represent somewhere between 72 × n and 1530 × n transmitted bytes. The ifconfig command on your router might ...


0

To expose the VM to your LAN network use Direct Attachment to en1234 as Network Interface of a VM. The DHCP server (most likely your ISP router) will give it an IP such as 192.168.0.123 and you can connect to it normally. Bridge mode to en1234 is reserved for directing traffic between the host <=> instance. The last option for VLAN are virtualized ...


0

This is a Network Monitor to monitor the network traffic. The network manager applet nm-applet is provided by network-manager-gnome package: sudo apt install network-manager-gnome From the terminal: nm-applet & After installing network-manager-gnome , you will be able to add the network manager applet to your panel.


1

Meh, found the answer myself, partly with help from Bridging ethernet interface Remove all settings for eth0 in /etc/network/interfaces and it all works It is stated a bit convoluted in the description I was following since it is described in a new file ## make sure all config related to eth0 deleted ## - which of course was pointing to the entire ...


1

The ss program is using a sock_diag(7) netlink socket to retrieve information about sockets. But the sock_diag interface doesn't support a "monitor"/watching/listening mode, as rtnetlink(7) does. You can only do queries via a sock_diag socket. You can however capture the tcp syn (=connect) packets via pcap/tcpdump and use to sock_diag interface to find ...


0

After doing some more research I found out that some internet service providers block certain ports (port 80, 25, and 110) by default, so that even if you forward a port through your router, the ISP might still block it. I had to call my ISP and ask them to unblock it and this resolved the issue.


1

While ss only dumps socket statistics, and you would need to simulate continuous dumps (with watch or a while loop), netstat has a continuous mode(-c). netstat -ntcp | grep ' 127.0.0.1:1234' Note the two spaces before 127... is not a typo, if you need to capture only the client pid. Sample output: $ netstat -ntcp | grep ' 127.0.0.1:1234' (Not all ...


1

Why does a virtual bridge need an IP address when a physical one does not? It is a misconception that a virtual bridge needs an IP address. It does not need it. You actually can have a virtual bridge without an IP address. But then the host itself won't be reachable over IP on that physical interface at all: only the VMs will. In a enterprise ...


0

The explanation and the solution can be found at DHCP on Server 2012 R2 does not understand Fedora 25.


0

There configuration file for your ppp connection should be located at /etc/ppp/peers/dsl-provider by default. You can add the peer addresses to it in the following manner: # assuming local peer address is `X.X.X.X` and remote peer address is `Y.Y.Y.Y` # You can omit either address. See man pppd(1) for more information. X.X.X.X:Y.Y.Y.Y You may also need to ...


2

Very good workaround, thanks! Just to let you know that this solution is also working with a Windows VM (I am using libvirt/kvm https://libvirt.org/drvqemu.html). Also, I believe that you have no choice and 192.168.137.1/24 is the default sharing IP (on Windows 10 at least). Add a second virtual network adapter to your VM (do not configure the gateway): ...


0

1.set http and https proxy in firefox. 2.set config.json on vps server side. vim /etc/kcptun/config.json { "listen": ":20000", "target": "127.0.0.1:8888", "key": "xxxxxxxx", "crypt": "salsa20", "mode": "normal", "dscp": 46, "sockbuf": 16777217, "smuxver": 2, "streambuf": 2097152, "nocomp": true }


3

There are two tools you could use to monitor TCP connect events on Linux: tcpconnect.py in bcc tools (pkgs.org, repology) tcpconnect.bt in bpftrace (pkgs.org, repology) The difference between the two is that the former provides options for customizing output (e.g., filtering by PID or port number) while the latter is a more simplistic tool and doesn't ...


Top 50 recent answers are included