Sunday, June 26, 2016

iptables: Setting Up iptables: Accept Only Output and Reject Input

Command (Checking current settings for iptables):

$ sudo iptables -L -v
[sudo] password for username:

Result:

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination      

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination      

Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination


Command (Create a script):

$ cat ~/bin/set_firewall

Result:

#!/bin/bash

#Deleting every configurations
iptables -F
iptables -X

#Default policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT

#Accept ping
iptables -A INPUT -p icmp -j ACCEPT

#Accept loopback
iptables -A INPUT -i lo -j ACCEPT

#Open using ports
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT

#After session is established, let packets through
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

#Save the configurations
iptables-save


Command (Add execution mode):

$ sudo chmod +x ./set_firewall 


Command (Execute the script):

$ sudo ./set_firewall 

Result:

# Generated by iptables-save v1.6.0 on Sun Jun 26 11:24:41 2016
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
COMMIT
# Completed on Sun Jun 26 11:24:41 2016


Command (Checking current settings for iptables):

$ sudo iptables -L -v
[sudo] password for username:

Result:

Chain INPUT (policy DROP 376K packets, 21M bytes)
 pkts bytes target     prot opt in     out     source               destination        
  262 15437 ACCEPT     icmp --  any    any     anywhere             anywhere          
    0     0 ACCEPT     all  --  lo     any     anywhere             anywhere          
  637 35360 ACCEPT     tcp  --  any    any     anywhere             anywhere             tcp dpt:http
17217 2332K ACCEPT     tcp  --  any    any     anywhere             anywhere             tcp dpt:ssh
    0     0 ACCEPT     all  --  any    any     anywhere             anywhere             state RELATED,ESTABLISHED

Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination        

Chain OUTPUT (policy ACCEPT 17561 packets, 3529K bytes)
 pkts bytes target     prot opt in     out     source               destination         


Gackt: Malice Mizer: Le Ciel

Gackt

Friday, June 24, 2016

David Eisenbud: Complex Numbers are Awesome

David Eisenbud

Tim Burness: Monster Group (a little extra bit)


  • Baby monster
  • List of finite simple groups

Tim Burness: Monster Group

Tim Burness


  • Monster group (モンスター群)
  • Sporadic group
  • 808,017,424,794,512,875,886,459,904,961,710,757,005,754,368,000,000,000
  • 196,883 dimensions
  • 26 sporadic groups

John Horton Conway: Life, Death and the Monster

John Horton Conway


  • Monster Group

Boston Dynamics: Introducing SpotMini

Monday, June 20, 2016

Gackt: MALICE MIZER: 月下の夜想曲

Gackt

Gackt: MALICE MIZER: au revoir

Gackt

Taka: La'cryma Christi: With You

Taka

yasu: Janne Da Arc: Hirakata Blow Down

yasu

Tsutomu Ishizuki (石月努): FANATIC◇CRISIS

Tsutomu Ishizuki

Kiyoharu (清春): Kuroyume (黒夢): I HATE YOUR POPSTAR LIFE

Kiyoharu

Kiyoharu (清春): Kuroyume (黒夢): ゲルニカ

Kiyoharu

Kiyoharu (清春): Kuroyume (黒夢): 無期限停止直後、清春インタビュー

Kiyoharu

Hyde: L'Arc~en~Ciel: Flower

Hyde

Hyde: L'Arc~en~Ciel: The Fourth Avenue Cafe & XXX (2014)

Hyde

Kirito (キリト): Smells Like Teen Spirit

Kirito

Kyo (京): Dir en grey: Insane and Amazing Voice

Kyo

Ryuichi Kawamura (河村隆一): I love you

Ryuichi Kawamura

IZAM: SHAZNA: すみれSeptember Love

IZAM

IZAM: SHAZNA: Melty love

IZAM

Yosui Inoue (井上陽水): 氷の世界Tour 2014: 桜三月散歩道

Yosui Inoue

Yosui Inoue (井上陽水): 氷の世界Tour 2014: 夢の中へ

Yosui Inoue

Yōsui Inoue (井上陽水): 氷の世界Tour 2014: リバーサイド ホテル

Yōsui Inoue

Keisuke Kuwata (桑田佳祐): Yoshiko-san (ヨシ子さん)

Keisuke Kuwata

Keisuke Kuwata (桑田佳祐): 明日晴れるかな

Keisuke Kuwata (桑田佳祐): 白い恋人達

Keisuke Kuwata

John Gruber: The Talk Show Live From WWDC 2016

John Gruber

OMJ: Nick and Chris: Assisted Suicide Now Legal In Canada: But Does It Go Too Far?

Andrey Rudenko: 3D Printed Concrete Castle

Andrey Rudenko

Ma Yihe: Yingchuang New Materials: A Private Company in Shanghai Used 3D Printers to Print 10 Full-sized Houses in One Day

Ma Yihe

Billy Corgan: We Need To Talk About Billy Corgan

The Secret Life of Cats

Tim Wu: Explaining Net Neutrality Is Easier On A Giant Roller Coaster

Tim Wu

New Discovery: Blood-Red Worms That Thrive in a Toxic Cave (EXCLUSIVE VI...

Thursday, June 16, 2016

Bramble Cay melomys: First Mammal Extinction from Climate Change



  • Human-induced climate change

Bill Nye: Juno the Solar-Powered Spacecraft

Bill Nye

2016 HO3: Earth's Constant Companion

Conan O'Brien: On The Orlando Shooting

Conan O'Brien

Ichiro Suzuki (イチロー): On All-Time Total Hits Milestone

Roger Bowley: Log Tables

Log Tables: Extra:
  • John Napier
  • Logarithm
  • Difference engine (階差機関)

How Pro Hockey Sticks are Made

How a Hockey Puck Is Made

Pete Licence: Time Capsule

Peter Licence

  •  Ionic liquid 

Roger Bowley: Time Capsule




  • Peter Mansfield (ピーター・マンスフィールド)

Roger Bowley: Safe Cracking with Richard Feynman

Roger Bowley

Andrew Pelling: This scientist makes ears out of apples

Andrew Pelling

Ichiro Suzuki (イチロー): Hitローズ超え4257安打!全打席全球結果

John Hockenberry: We are all designers

John Hockenberry

Maria Alandes Pradillo & Andrzej Nowak: The Grid, CERN's Global Supercomputer

Brady Haran: CERN Computing Centre (and mouse farm)

Tomoe Shinohara (篠原ともえ):徹子の部屋 (2016年6月14日)

Tomoe Shinohara

  • 青ヶ島のお針子
  • Camellia japonica (椿)
  • 「椿は島の恋の花。末は油で愛される。」

Joachim Löw: Germany’s coach smells fingers after adjusting himself

Joachim Löw

Monday, June 13, 2016

James Grime: The Opposite of Infinity: Infinitesimal (無限小)

James Grime

  • Infinitesimal (無限小)
  • Abraham Robinson (アブラハム・ロビンソン)
  • Hyperreal number (超実数)
  • Non-standard analysis (超準解析)

Hilarious Reverse Physics Debate: String Theory vs Loop Quantum Gravity


  • String theory landscape
  • Quantum gravity
  • String theory
  • Raphael Bousso
  • Carlo Rovelli
  • "It's true by definition"
  • "Imagine Chemistry did not exist"

Raphael Bousso: Is Information Fundamental



  • Entropy bounds
  • Quantum gravity
  • Matter

Ultimate Desk Setup Tour 2016

The Dream Desk 2 - MKBHD Edition!

The Dream Desk 3 - Retro Setup Edition

Friday, June 10, 2016

James Clewett: Random Numbers



  • Gaussian distribution
  • Normal distribution

Jason Fitzpatrick: Nascom 2 & Sharing the TV

Jason Fitzpatrick



  • Single-board computer (シングルボードコンピュータ)

武田邦彦: 大麻について議論




  • Government monopoly (専売制)

Uri Hasson: This is your brain on communication

Uri Hasson

  • Physical entrainment
  • Injection locking
  • Brainwave entrainment
  • Common ground (communication technique)

Hubert Zanczak: Two Questions to Ask a Stranger

Hubert Zanczak

Henry Segerman: Three Gears are Possible

Henry Segerman