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


12

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


7

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

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


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


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

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

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

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

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

'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

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


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

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

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

[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

OpenWrt stores config in the directory target/linux/<target system>/<subtarget>/profiles You can set target system and subtarget with command make menuconfig: In my case: target system = ar71xx subtarget = generic So the directory would be: target/linux/ar71xx/generic/profiles In this directory, you will find some predefine profiles, ...


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

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

Check out the OPKG Package Manager documentation section on the install argument (under the heading "Package manipulation") opkg can install package files from both remote and local locations, as in: opkg install http://downloads.openwrt.org/snapshots/trunk/ar71xx/packages/hiawatha_7.7-2_ar71xx.ipk opkg install /tmp/hiawatha_7.7-2_ar71xx.ipk The latter ...


3

For a NAT to work properly both the packets from client to server and the packets from server to client must pass through the NAT. Note that the NAT table in iptables is only used for the first packet of a connection. Later packets related to the connection are processed using the internal mapping tables established when the first packet was translated. ...


2

OpenWRT versions from Kamikaze onwards (which is basically Kamikaze and Backfire, but not White Russian) do not use NVRAM to store settings or configuration. It is all stored in the filesystem, either in the base squashfs image or the overlayed jffs image. This means you should be able to re-flash the image and get back to "factory defaults". The way to ...


2

So where points that address you typed in a gateway field? I've never configured OpenVPN using NetworkManager but i suppose that is the place where you should provide the address of your router. And in your log file there is a line which says: Mar 7 15:42:43 ASDF nm-openvpn[23554]: Cannot load certificate file /home/g/Desktop/client1/client1.crt: ...


2

Does the Busybox not have grep -v? This should do the job in one simple command: grep -vi "<[ \t]*script" SOMETHING.html



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