echo `ifconfig $(netstat -nr | grep -e default -e "^0\.0\.0\.0" | head -1 | awk '{print $NF}') | grep -e "inet " | sed -e 's/.*inet //' -e 's/ .*//' -e 's/.*\://'`The steps outlined here make many assumptions about both your operating environment and your understanding of the Linux OS and services running on Linux. I am using the current LTS Ubuntu distribution 16.04 running in the cloud on a DigitalOcean Droplet. These steps should work just fine if followed closely and in order... but you know sh!& never works out the way you plan in Linux. I offer some troubleshooting advice, Google and Stack are your friends ask them for help.
ssh-add <path-to-ssh-key>and enter key passphrase when prompted. // ex path... /users/you/.ssh/id_rsa_digital-oceanssh root@<server-url-or-IP>// should login without prompting for passphrase
adduserand follow prompts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| clear | |
| declare -i rxnow txnow txlast rxlast | |
| while true | |
| do | |
| chain=`ifconfig $1|grep bytes` | |
| rxnow=`echo $chain | cut -d ":" -f2 | cut -d " " -f1` | |
| txnow=`echo $chain | cut -d ":" -f3 | cut -d " " -f1` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| opkg install luci-lib-json luci rng-tools usbutils avrdude avahi-daemon | |
| # If rng-tools is not installable, then install it by hand from e.g., http://download.linino.org/linino_distro/linino_dev/latest/packages/rng-tools_3-2_ar71xx.ipk | |
| # Edit your /etc/opkg.conf, add | |
| src/gz barrier_breaker http://download.linino.org/dogstick/all-in-one/latest/packages/ | |
| # Comment out your earlier src/gz | |
| opkg update | |
| opkg list|grep bridge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| The script helps you restore all installed OpenWRT packages after upgrading the main firmware image via sysupgrade. It works | |
| ONLY if the default firmware image provided by the OpenWRT project is sufficient to get connected to the Internet, but you | |
| want some extra packages for additional functionality. In other words, it WILL NOT WORK if connecting to the Internet | |
| requires installing extra packages (e.g., a kernel module for your LTE modem). | |
| The script has been tested for upgrading from OpenWRT 18.06.1 to 18.06.2 and to a development snapshot, as well as between | |
| development snapshots. On LEDE 17.01.x, "flock" is not a part of the default image, so has to be installed manually. | |
| Initial setup: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/awk -f | |
| # Coded by: Vladislav Grigoryev <vg[dot]aetera[at]gmail[dot]com> | |
| # License: GNU General Public License (GPL) version 3+ | |
| # Description: Select wireless channel automatically | |
| function get_iwphy() { | |
| cmd = "iw phy" | |
| while(cmd | getline) { | |
| if($0 ~ /^\s*Wiphy\s/) |
I haven't tried mainline kernel. just 4.4.x. Seems to work with Xenial and Jessie
make note of the MAC addresseses on the switch ports.. the 2 close together will be LAN1 and LAN2 in the OS. eth1addr and ethaddr2 in u-boot. The 3rd address will be for WAN in the OS aka ethaddr in u-boot
the WAN port is in-line with the SDcard slot on the board.... use that as your primary NIC for now.
Use my branch, or hopefully igor's once my merge request has been added. Standard armbian building expertise applies.
Hey there, apparently people are still using this Gist from 2013! It's out of date! Consult the Github docs.
- Create a GitHub account on github.com.
- Download either [GitHub for Mac][1] or [GitHub for Windows][2], depending on your operating system. Open the app and log in using the account you just created.
- (On Mac): After you login, click advanced and make sure that your name and email are correct. Then, click "Install Command Line Tools", just in case you want to start using the command line later in life.
- Create a new repository in your GitHub application. Name it your-username.github.io. The name is very important. Note the folder that GitHub is saving the repository to. Make sure the "Push to GitHub?" box is checked.
- Move your website's files into the folder that GitHub just created when you made the repository. IMPORTANT: Your homepage HTML file must be called "index.html", and it must exist in the top-level
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## Update fail2ban iptables with globally known attackers. | |
| ## Actually, runs 100% independently now, without needing fail2ban installed. | |
| ## | |
| ## /etc/cron.daily/sync-fail2ban | |
| ## | |
| ## Author: Marcos Kobylecki <fail2ban.globalBlackList@askmarcos.com> | |
| ## http://www.reddit.com/r/linux/comments/2nvzur/shared_blacklists_from_fail2ban/ |
