Hot answers tagged

19

iwconfig (and its wireless extension API) is deprecated (it's in "maintenance only mode" and "no new features will be added"). Use iw instead. This requires a moderately recent kernel (e.g. >= 3.0) with support for nl80211. using iw dev wlan0 scan, you can figure out the protocol used: If there are Supported rates below 11mbps (except 6), there might be ...


11

I think that what you're looking for is -T as documented in man dmesg: -T, --ctime Print human readable timestamps. The timestamp could be inaccurate! The time source used for the logs is not updated after system SUSPEND/RESUME. So, for example: [ 518.511925] usb 2-1.1: new low-speed USB device number 7 using ehci-pci [ 518.615735] ...


11

Another solution: awk '{$2 = sprintf("%02d", $2); print}'


8

$ sed 's/\<[0-9]\>/0&/' ./infile 201103 01 /mnt/hdd/PUB/SOMETHING 201102 07 /mnt/hdd/PUB/SOMETH ING 201103 11 /mnt/hdd/PUB/SO METHING 201104 03 /mnt/hdd/PUB/SOMET HING 201106 01 /mnt/hdd/PUB/SOMETHI NG


7

This answer applies to OpenSSH. OpenWRT includes Dropbear by default, so you would need to need to replace it, as per this link (basically, install openssh-server and disable dropbear). With OpenSSH, what you'd like is possible using two possible mechanisms: Separate sshd configurations for your LAN and WAN interfaces. This will only work well if you have ...


6

The version of tar on OpenWRT is a smaller one than the one on full-blown systems, designed to fit small devices (it's BusyBox.) To keep small, it lacks features such as the automatic detection of compressed archives. Try declaring the compression format manually with the -z option: tar -xvzf ejdk-8u65-linux-arm-sflt.tar.gz Support for gzip in the tar ...


5

No tool other than iw can give you more information. iw already gives all information that the network driver gives. If some information is missing, update your network driver (that mean your kernel) and/or iw. An example of an up-to-date iw output: BSS 42:42:42:42:42:42 (on w0) TSF: 4922636642679 usec (56d, 23:23:56) freq: 2437 beacon ...


5

With SSH unavailable (and possibly no UNIX/Linux machine the FTP server runs on, you could use netcat otherwise, too), the following might work: Using curl, you can upload from STDIN to a file via FTP this way: tcpdump -w - | curl -u FTPUSER:FTPPASS ftp://ftpserver/where/ever/dump.pcap -T - where tcpdump outputs raw packets (compare this question) and ...


4

No. For so many reasons. One obvious one: 802.11 = 2.4, 3.6, or 5 GHz X band = 8-12 GHz K band = 18-27 GHz Ka band = 26.5 - 40 GHz Layman's explanation of the above: The router cannot "tune" to the needed frequencies. (Then there's the DSSS vs burst detection, etc, etc, etc...)


4

If you need to guard against malicious damage, then MD5 is the fastest hash which is secure enough (although it does have known weaknesses and so SHA2 is strongly preferred). If you just want to guard against accidental damage, then a CRC checksum will be faster and good enough. The standard cksum utility can be used to calculate this.


4

OpenVPN is designed to be secure. It will only allow clients who have the keys signed by you. The most important thing is keeping the private keys secure. Always encrypt them on the clients and check the permissions on the key file on the server. Don't keep the CA private keys on the server it doesn't need them. Encrypt it put it on a pendrive and protect ...


4

1) These rules afaik completely USELESS, I'm sure about this, so there is no real question regarding this, at least a "fixme". No, these rules are useful. I'll tell you why if you tell me why you think they're useless. Ok, I'm kidding, I'll tell you whether you want it or not. The purpose of these rules are to keep the design simple. Simplicity is ...


4

your version of dmesg is obviously not the full-fledged one from util-linux but instead is provided by busybox. busybox provides the basics of a multitude of utilities, but it doesn't provide all their nifty features. if you want to use the -T flag as (rightly) suggested by terdon, you will need to use the dmesg binary provided by util-linux ...


4

On OpenWRT, date is busybox, which has limitations, but this is not strictly one of them. The underlying problem is that libc (uClibc) does not support this GNU strftime extension. You should have lua by default, but that won't help without some other non-default modules. hwclock calls gettimeofday() for comparing/setting the RTC (hardware clock), but it ...


3

If you have a C compiler on it and can't find anything else, this will report, e.g. > millitime && sleep 1 && millitime 14/11/2014 9:39:49:364 14/11/2014 9:39:50:368 #include <errno.h> #include <stdio.h> #include <string.h> #include <sys/time.h> #include <time.h> int main (void) { struct timeval now; ...


3

The two options are similar. Bridge This sets up your device so that it bridges traffic between the ethernet interface and the wireless interface. Nothing more. Nothing less. Your ethernet interface needs to be connected back to the rest of your network so that wireless devices connecting to the Access Point can see your network. If you have multiple ...


3

Not every OpenWrt environment ist set up the same way, so my answer is a shot in the dark... The example output is taken from OpenWrt-12.09 on a "TP-Link TL-WDR4300". ssh into your router. Check your filesytsems. root@AP9:~# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 5184 2124 3060 41% / ...


3

[TL,DR: use the urlencode_grouped_case version in the last code block.] Awk can do most of the job, except that it annoyingly lacks a way to convert from a character to its number. If od is present on your device, you can use it to convert all characters (more precisely, bytes) into the corresponding number (written in decimal, so that awk can read it), ...


3

'tr' can be used for this. Normally, you could do the following: tr -cd '\11\12\15\40-\176' < raw.php This deletes any characters that aren't one of the ones listed. The \NNN notation represents the character in octal, this lets us get tab, newline, carriage return in addition to the other characters. Busybox's tr currently has a bug when it comes to ...


3

OpenWRT and DDWRT are the two main distros in this category. I would encourage you to help find and fix the issue. If it's affecting both distros, it's likely to be a kernel problem that you would run into even if you built your own system from sources only. It is unfortunate that the developer community is so small compared to the user base on these ...


3

You could look at using inadyn, a client to update your DNS entries. There is a page about it on the DynDNS support site. Alternatively, there is this line[1]: curl -v -k -u user:password "https://members.dyndns.org/nic/update?hostname=&myip=$(curl -s http://checkip.dyndns.org | sed 's/[a-zA-Z/ :]//g')&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG" [1] ...


3

Sat Jul 9 13:14:21 2011 WARNING: potential route subnet conflict between local LAN [192.168.80.0/255.255.255.0] and remote VPN [192.168.80.1/255.255.255.255] For some reason, your configuration seems to be sharing ip address space. Your VPN is selecting addresses from the 192.168.80.x address space, and your local LAN is selecting addresses from the ...


3

Traffic reporting on OpenWRT is not much different than on other Linux platforms. You can use a shell to look at the interface statistics or use one of the several reporting / monitoring packages. Personally I use collected to gather some data from my OpenWRT routers and build graphs on another machine along with some other relevant data.


3

To monitor traffic and other information about my OpenWrt router I use munin. I detail my experience in my posting on Monitoring with Munin. It doesn't specifically address traffic by IP address, which a tool like ntop might be better suited for. The firewall can be configured to gather such accounting data, but you would need to extract and summarize ...


2

I don't believe it is in the standard distribution. You will need to compile your own kernel. There is ticket with a patch already submitted.


2

If I understand your question correctly (which is always dubious with your questions), this isn't possible. Forwarding doesn't keep any state: the router receives a packet, analyses it, sends it onwards to its next destination, and forgets what the packet was. You can count or log packets, but you can't keep track of connections at that level. It would make ...


2

The user fyi on the OpenWRT forum suggested that using WEP is a bad idea for bridges and that using WDS instead could fix this. Did you try that? In reviewing your configs and comaring them to the tutorial you linked, it looks like you might be missing a whole section. In /etc/config/wireless you need two sections titled config 'wifi-iface'. Both of them ...


2

With iptables firewall this works (Openwrt also uses iptables): iptables -t nat -A PREROUTING -s 192.168.1.0/24 -p udp --dport 53 -j DNAT --to 192.168.1.1 iptables -t nat -A PREROUTING -s 192.168.1.0/24 -p tcp --dport 53 -j DNAT --to 192.168.1.1 On your router use Opendns servers. 192.168.1.1 is the Openwrt router ip. 192.168.1.0/24 is the LAN network ...


2

Have a look at the IPv6 HowTo on the OpenWRT wiki. It's a pretty good starting point. I'm not going to give a detailed guide here, but a point-form summary of the broad steps to take. First, choose a static IPv6 address from the /64 block your ISP gave you, and assign that address to the LAN side of your OpenWrt router. Next, install and configure radvd in ...


2

You can write the tcpdump output to a pipe and then save it elsewhere. I updated your BPF filter as well. tcpdump -w - host 10.10.10.10 | ssh host2 'cat - > `date +%F-%Hh-%Mm-%Ss-%N`.pcap' This will write the packets to stdout, then write it over an ssh connection to another host. You can also turn it around and run it from the other host. ssh ...



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