Tag Info

New answers tagged

1

As was mentioned by @Patrick in one of the comments to my question, I was encountering an issue with my iptables NAT rules. eth0: Internal network, 192.168.1.200 eth1: External network, 192.168.0.2 My NAT rule was: $ iptables -t nat -A POSTROUTING ! -o eth0 -j MASQUERADE That means, that all traffic whose output destination device is not interface ...


4

If you have this problem with every program you run, you should check your server firewall rule. Make sure that it only use NAT for external destination. Your route table make no sense if you have a wide NAT rule. After fixing firewall rule, for wget, you can use --bind-address option to chose what interface you want to use: wget ...


2

You can create virtual interfaces using the iproute2 toolkit. ip link add veth0 type veth peer name veth1 This will create 2 interfaces, veth0 and veth1. Think of them as 2 ends of a pipe. Any traffic sent into veth0 will come out veth1 and vice versa. If you want the traffic to be routed, you can do: sysctl -w net.ipv4.conf.veth0.forwarding=1 This ...


9

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


0

This isn't directly related to the failure here... but I ran into stack exchange before the ubuntu forums on google... If you are having issues getting hostapd to run via init.d (service hostapd start) and nothing seems to be occurring... refer to this forum post.


1

The list you're looking for is most probably at http://www.oid-info.com/ Yes, this is some kind of standard: OIDs are objects in the MIB, the global root MIB was defined in RFC 1155. It has since been extended, the SNMP MIB is RFC 1157.


3

As steeldriver notes in a comment, there is a typo. If that's not just a typo in your question, you need to fix that. iface etho0 inet static ^ extra "o" Also, for readability, traditionally they are indented and you don't actually need to specify the network and broadcast when the defaults are OK: iface eth0 inet static address ...


0

I did some digging and this ticket in the Chromim project's issue tracker sounds like what you're after. The ticket: Issue 288385: P2P: Write a fake avahi/zeroconf network to simulate a private network of peers has the following description: Project Member Reported by de...@chromium.org, Sep 9, 2013 We want to run P2P tests on a single machine, ...


0

You can give nmap a range: $ nmap -sn 138.0.0.0/24 $ nmap -sn 138.0.0.0-255 The -sn flag means to just ping the host and return (i.e. no port scan like nmap usually does). Edit: After reading the comments I see that bahamat mentions arp. In fact, arp with no arguments runs faster than nmap for me, and finds everything connected to my LAN: $ time arp ...


1

I believe I may have figured it out. It turns out that wicd is installed and running. On bootup, my /etc/network/interfaces was in charge, but when the cable was unplugged, wicd took over. Editing /etc/wicd/wired-settings to include my static IP did the trick. It's not great that is configured in two places, but I've added a pointer in ...


0

Connect to a network wired or wireless. dhcpcd is automatically loaded on boot. dhcpcd.service is started by default for all interfaces. Stop it if manually configuring wired network. systemctl stop dhcpcd.service for connecting to a wireless network wifi-menu wlo1 with wlo1 being the wireless interface. ip link to see interfaces, or to bind dhcpcd to ...


1

ARP is a Layer 2 protocol, so if the device is on a different subnet you won't be able to find it by MAC address. Your 2 best options are: Record it's IP before you deploy it, ip a Setup a listener on another computer and configure a reverse shell on the pi to call that computer once it's network stack is established. At least one of these methods should ...


1

The output from netstat -r does not contain a defaultroute. This should come via DHCP from your VM host software. Edit: You may try to find out whether the defaultroute gets configured or not using rtmon and ip from the package iproute. With rtmon you may watch the netlink interface of the kernel and with ip you may have a look at these logs. Shutdown ...


0

Your VM, in addition to getting a IP from the DHCP server, is also getting the nameserver as well. You can either override this at the DHCP server or you can setup the Debian VM to inject its own options instead. Take a look at how to accomplish this in my answer to this other U&L Q&A titled: Can I set my Debian box to use OpenDNS nameservers if it ...


1

If you know its dns name you can simply ping it. You could use arping to ping its MAC You could configure it to send you an email with its IP once the connection is established...


-1

If it is a completely fresh installation u can try nmap -A 192.168.1.* then look for an open ssh on port 22, else u may have to start a long service detection scan on all 65k ports using the following: nmap -p- -sV 192.168.1.* Since its common practice to move ssh/vnc and other services on other ports uve got a good chance finding your own machine ...


0

There are other ways, but if you can search from the same subnet, I would use a zeroconf/Bonjour lookup. This page has a ton of setup information. Search on the page for "avahi" for more detailed instructions. But the basics are to install the avahi daemon and start it running, then connect from an OS that understands Bonjour or Zeroconf names. Ubuntu ...


0

I had a similar problem. I found out that the the GSM modem ISP blocks all incoming traffic. I read that you can pay the ISP extra to permit incoming traffic. I only wanted to ssh to the RPi over GSM. A reverse SSH tunnel was the solution. I don't know how to solve your problem. But at least I can provide a hint to the cause of it.


1

First try basic connectivity to your destination. telnet smtp.gmail.com 587 If that doesn't work you're probably looking at a firewall issue. Check that your TLS works openssl s_client -starttls smtp -crlf -connect smtp.gmail.com:587 If the first worked but TLS fails you are probably using a deep inspection firewall that blocks you from using TLS ...


0

After much research and reading this great article I found temporary solutions: decreasing net.ipv4.route.gc_timeout so the entries from cache get removed faster, and increasing net.ipv4.route.gc_interval so the garbage collector runs more often. But these are all temporary, since on our machine it only solved the problem for a few hours and more intensive ...


2

IIRC, openssl s_client -connect localhost uses TLS by default. From https://www.openssl.org/docs/apps/s_client.html: -ssl2, -ssl3, -tls1, -no_ssl2, -no_ssl3, -no_tls1 These options disable the use of certain SSL or TLS protocols. By default the initial handshake uses a method which should be compatible with all servers and permit them to use SSL ...


3

This is as simple as it could be. You do not need any bridging. Just MASQUERADE your local network on RPi: iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE Enable forwarding of traffic: echo 1 > /proc/sys/net/ipv4/ip_forward RPi will not work as invisible bump-on-the-wire but will need a network setup between it and your private router – which ...


1

Here are a couple of solutions that can introduce latency, packet re-ordering and packet drops on *BSD and Linux. Using netfilter to simulate Packet loss Using tc and netem to introduce delays and loss On FreeBSD, use dummynet. Here's an intro.


2

The problem is that you have a route in your local table that says: $ ip route show table local [...] local 192.168.1.101 dev eth0 scope host [...] When sending a packet with [src=192.168.1.101 dst=192.168.1.101], and expecting the router to send that packet back reflected (some will refuse to this kind of thing), you want the outgoing packet to skip that ...


2

Flush the iptables rules just in case (iptables -F). With the network in bridge mode (I assume that was what you were after ideally) run wireshark on the Ubuntu machine and watch for DHCP requests. If you see a request but no response then you're likely looking at network restrictions. Either way wireshark will help you get a better of idea what is ...


0

I just ran into the same problem immediately after installing RHEL 7.0. Bizarrely enough, a reboot with no config changes eliminated the problem. Somehow, when RHEL came up following the install, it's networking was apparently in a messed up state, and it needed another reboot to come up clean.


0

connection timed out means that the program sent a SYN packet (start of a TCP connection) but never got a response. Most common causes are a faulty network connection (I think we can safely rule that one out) or a firewall that silently drops the packets somewhere between the source and destination. NOTE: I can't speak to whether there is an SSH daemon ...


3

That IP is likely inside a NAT block which VirtualBox has set up. You need to either bridge or forward if you want to access the machine's ports from outside; you can do both from the virtual machine settings panel.


4

You can do this through Linux capabilities. You'll need to set CAP_NET_BIND_SERVICE and you can use the answer given here as a guide. However, as others have pointed out, this is an unwise thing to do. Having a user take over port 22 or port 80 could have very bad consequences.


1

I think the issue is with your if statement. if ! ping -q -w 1 -c 1 $(ip r | grep default | cut -d ' ' -f 3) More specifically: ping -q -w 1 -c 1 $(ip r | grep default | cut -d ' ' -f 3) The host ip isn't passed properly. Note that each portion works by itself (i.e. ping host and ip r....). This has been working for me: $ ip r | grep "default" | cut ...


1

After looking into kernel sources I worked it out. You have to increase your net.ipv4.rt_cache_rebuild_count and it works again.


4

if you really want to lock down this user as much as possible create a virtual machine. The chroot don't really isolate this process. If a real virtual machine is too heavy, maybe you can have a look at linux containers, a lightweight version of virtual machine. Harder to configure though. If you want something even more lightweight you can try to ...


1

If this is a hosted webserver I would suspect that it's been configured in a classic webserver fashion. Meaning that it allows incoming connections on port 80 but for security they may have disallowed outgoing connections on port 80. I would guess this is the issue. curl and wget generally work out of the box with no issues. curl chooses a port based on the ...


1

After changing to dhcp you need to restart the service or from the NetworkManager gui. So then you will get a new IP and then you need to check the IP with ifconfig command and then you can ping that IP and check.


2

You should use tcpdump with the -w switch. tcpdump -i INTERFACE -w FILENAME Replace INTERFACE with the interface you want to listen and FILENAME with the location of the file to which you need to capture the output.


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


2

hostname returns the configured hostname or nodename. In practice, it can either be a short name (in most configurations) or a long name (normally the FQDN in this case). The short name is given by hostname --short. hostname --fqdn returns the FQDN, which is gethostbyname on the nodename (as returned by the uname system call, see uname(2) man page). ...


9

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


0

I had the same symptoms on a fresh install with opensuse 13.1 32bit on a virtual machine. For me, the solution was: Edit /usr/lib/systemd/system/network.service and set Type=oneshot in the [Service] section instead of Type=forking, as proposed here


0

Try this: ssh -L *:8080:myremoteserver.com:8080 -N watson excerpt from man ssh for option -L: By default, the local port is bound in accordance with the GatewayPorts setting. However, an explicit bind_address may be used to bind the connection to a specific address. The bind_address of “localhost” indicates that the listening port be bound for local use ...


1

The question (as I understand it) is to set a static route over the VPN device for the net 10.xx.xx.xx/24. Now the traffic is going over the default route to eth0. So first remove the 10.xx.xx.xx route if available: root@host:~# route del -net 10.xx.xx.0/24 Then set the correct route: root@host:~# route add -net 10.xx.xx.0/24 dev tun-aib0 In the end ...


1

Windows uses a different system for hostname resolution to Linux. Linux uses the /etc/hosts file and/or DNS for name resolution The /etc/hosts file is simply a list of IP address and names and was once the only way to map names to IP addresses before it was realised that it was getting to big to manage. The solution was DNS (Domain Name System), which is a ...


1

Windows computers find each other by using NetBIOS. Basically all the nodes on the network elect one computer to be in charge of name resolution, and new nodes can just query this node. Your host command should be expected to fail if you don't have a DNS server set up. That's the equivalent of nslookup on Windows. If you run nslookup on a Windows computer ...


1

If you don't have a DNS server at home, which is unlikely, there seem to be a couple of options. Read up on avahi-server (see this thread) to see if that solves your issues. Note the comment about appending ".local" to your hostname. By the way, what do you get when you type "hostname" at command prompt? I also suggest reading the manpage for hostname, ...


0

Have you enabled and started systemd-networkd.service? First create a file /etc/systemd/network/mynet.network containing (if you use DHCP): [Network] DHCP=yes Then issue these commands: systemctl enable systemd-networkd.service systemctl start systemd-networkd.service If that doesn't work (try rebooting aterwards in case you've been trying many ...


0

emp1s0 is the new Consistent Network Device Naming name for eth0. Use it where you would have used eth0 in the past and it will be fine. It can be disabled if you insist on returning to eth0 by creating an empty: /etc/udev/rules.d/80-net-name-slot.rules


0

you need to assign the ipaddress using following format Here 192.168.1.1 is my Router (gateway) auto eth0 iface eth0 inet static address 192.168.1.2 netmask 255.255.255.0 gateway 192.168.1.1 network 192.168.1.0 broadcast 192.168.1.255 dns-nameserver 192.168.1.1 8.8.8.8 8.8.4.4 you have to edit the resolv.conf for accessing the ...


0

Finally figured out the correct Google query to find an answer: it's fixed in kernel 3.14. Ubuntu 14.04 LTS installs kernel 3.13. The original bug report Thread stating when it was fixed


0

If you have bash and coreutils (e.g. timeout, sleep), but not nc/lsof/netstat, you can use this solution which uses bash magic tcp sockets: while ! timeout 1 bash -c "echo > /dev/tcp/localhost/13000"; do sleep 10; done


1

Are you familiar with sar? You can try sar -n ALL to get all possible network statistics, or if you want rx and tx statistics per network device, every second - try this: sar -n DEV 1 For a 5 second avarage of rx and tx for eth0 (for example) do: sar -n DEV 1 5 | grep -i eth0 | tail -n1 | awk '{print $5, $6}'



Top 50 recent answers are included