Install tcpkill
yum -y install dsniff --enablerepo=epel
View connections
netstat -tnpa | grep ESTABLISHED.*sshd.
Block with ip tables
iptables -A INPUT -s IP-ADDRESS -j DROP
Kill connection
package main | |
/* | |
#include <EXTERN.h> | |
#include <perl.h> | |
#include <stdio.h> | |
void init_perl() { | |
// PerlのCランタイムの初期化(全体で1回) | |
int argc = 0; |
package main | |
import ( | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
) | |
func Handler(w http.ResponseWriter, req *http.Request) { |
Install tcpkill
yum -y install dsniff --enablerepo=epel
View connections
netstat -tnpa | grep ESTABLISHED.*sshd.
Block with ip tables
iptables -A INPUT -s IP-ADDRESS -j DROP
Kill connection
package main | |
import ( | |
"fmt" | |
"gopkg.in/alecthomas/kingpin.v2" | |
) | |
var ( | |
verbose = kingpin.Flag("verbose", "Enable verbose mode.").Short('v').Counter() |
FYI: https://qiita.com/sfujiwara/items/b227b3ca6a1e8f104bc9
$ date +%z
+0900
$ /path/to/resty start_time.lua
1970-01-01T09:00:00+09:00
$ aws rds describe-db-snapshots --snapshot-type automated | jq '.DBSnapshots | sort_by(.SnapshotCreateTime) | reverse | .[0]'
{
"Engine": "mysql",
"SnapshotCreateTime": "2016-09-25T18:46:55.366Z",
"AvailabilityZone": "ap-northeast-1a",
"PercentProgress": 100,
"MasterUsername": "root",