Skip to content

Instantly share code, notes, and snippets.

View zycon's full-sized avatar
🎯
Focusing

Tibin Lukose zycon

🎯
Focusing
View GitHub Profile
@zycon
zycon / readme.md
Last active June 18, 2020 20:08
openvpn http traffic to burp suite

Sometime it would be hard to configure proxy in smartphone for insepcting the packets. And some apps might not respect it too, the quick solution which came into my mind is to configure an openvpn server in laptop and then forward the http packets to burp in the host machine Steps

  1. Configure an openvpn server with a client in a host
  2. Configure burp suits to listen on all interface with invisible proxy listening on port 8080
  3. forward the packets by applying the iptables in NAT entry
iptables -t nat -A PREROUTING -i tun0 -p tcp --dport 80 -j REDIRECT --to-port 8080
iptables -t nat -A PREROUTING -i tun0 -p tcp --dport 443 -j REDIRECT --to-port 8080

you may need to root your android and push the burp root certificates to the trusted system ca's to intercept the app traffic

@zycon
zycon / keybase.md
Created May 26, 2020 08:24
keybase.md

Keybase proof

I hereby claim:

  • I am zycon on github.
  • I am tibin (https://keybase.io/tibin) on keybase.
  • I have a public key whose fingerprint is D4AC F4BC 2229 F36C 9A3F 8686 9681 D4B5 817D A2CB

To claim this, I am signing this object:

@zycon
zycon / nfs-pvc-claim.yaml
Created May 25, 2020 22:14
NFS PVC Claim
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-storage-logs
namespace: default
spec:
capacity:
storage: 50Gi
accessModes:
- ReadWriteMany
@zycon
zycon / nfs-server-kubernetes.yaml
Last active May 25, 2020 22:10
NFS Server yaml kubernete readwritemany
apiVersion: v1
kind: ReplicationController
metadata:
name: nfs-server
namespace: default
spec:
replicas: 1
selector:
role: nfs-server
template:
@zycon
zycon / pvc-nfs.yaml
Created May 25, 2020 22:01
pvc-nfs.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pv-claim-nfs
namespace: default
spec:
storageClassName: "nfs-storageclass"
accessModes:
- ReadWriteOnce
resources:
@zycon
zycon / ReadWriteManyNFS.yaml
Last active May 25, 2020 21:51
nfs storage persistent volume with persistent disk gcp
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-pd
spec:
storageClassName: "nfs-storageclass"
capacity:
storage: 200G
accessModes:
- ReadWriteOnce
@zycon
zycon / gist:7106847fc6ce06507258c329a3f13a32
Created May 24, 2020 19:24
iptable entries sample openvpn
sudo iptables -A INPUT -i tun0 -j ACCEPT
sudo iptables -A FORWARD -o tun0 -i ens3 -j ACCEPT
sudo iptables -A FORWARD -i tun0 -o ens3 -j ACCEPT
sudo iptables -A INPUT -i ens3 -p tcp --dport 80 -j ACCEPT
sudo iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
iptables -D OUTPUT -d 8.8.8.8 -o ens3 -j DROP
merge config files
KUBECONFIG=~/.kube/config:~/.kube/config2 kubectl config view --flatten > ~/.kube/temp
mv ~/.kube/temp ~/.kube/config
disable system policy for installing from any source
sudo spctl --master-disable
file=backup.tar.gz
curl -X PUT -T "$file" \
-H "Host: <BUCKET_PATH>.amazonaws.com" \
-H "Date: $(date +"%a, %d %b %Y %T %z")" \
-H "Content-Type: application/x-compressed-tar" \
"https://<BUCKET_PATH>.amazonaws.com/$file"