Skip to content

Instantly share code, notes, and snippets.

@qix
Created April 29, 2015 00:35
Show Gist options
  • Save qix/781c4bc417f7deb0b1d1 to your computer and use it in GitHub Desktop.
Save qix/781c4bc417f7deb0b1d1 to your computer and use it in GitHub Desktop.
```
root@k8s-node3:/home/josh# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.240.0.1 0.0.0.0 UG 0 0 0 eth0
10.16.4.0 0.0.0.0 255.255.255.0 U 0 0 0 docker0
10.240.0.1 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
root@consumer-statsd-tyy21:/authbox/apps/consumer-statsd# ifconfig
eth0 Link encap:Ethernet HWaddr 02:42:0a:10:04:46
inet addr:10.16.4.70 Bcast:0.0.0.0 Mask:255.255.255.0
inet6 addr: fe80::42:aff:fe10:446/64 Scope:Link
UP BROADCAST RUNNING MTU:1460 Metric:1
RX packets:5551 errors:0 dropped:0 overruns:0 frame:0
TX packets:8429 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:37508339 (37.5 MB) TX bytes:820531 (820.5 KB)
```
@qix
Copy link
Author

qix commented Apr 29, 2015

# iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
sshguard   all  --  anywhere             anywhere            

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         


# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination         
KUBE-PORTALS-CONTAINER  all  --  anywhere             anywhere            

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
KUBE-PORTALS-HOST  all  --  anywhere             anywhere            

Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination         
MASQUERADE  all  --  anywhere            !10.0.0.0/8          

Chain KUBE-PORTALS-CONTAINER (1 references)
target     prot opt source               destination         
REDIRECT   tcp  --  anywhere             10.16.0.2            /* default/kubernetes: */ tcp dpt:https redir ports 59467
REDIRECT   tcp  --  anywhere             10.16.0.1            /* default/kubernetes-ro: */ tcp dpt:http redir ports 58930

Chain KUBE-PORTALS-HOST (1 references)
target     prot opt source               destination         
DNAT       tcp  --  anywhere             10.16.0.2            /* default/kubernetes: */ tcp dpt:https to:10.240.209.10:59467
DNAT       tcp  --  anywhere             10.16.0.1            /* default/kubernetes-ro: */ tcp dpt:http to:10.240.209.10:58930

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment