Skip to content

Instantly share code, notes, and snippets.

@kostyll
Created December 13, 2014 12:00
Show Gist options
  • Save kostyll/b559c74954bfe72c9b7a to your computer and use it in GitHub Desktop.
Save kostyll/b559c74954bfe72c9b7a to your computer and use it in GitHub Desktop.
share inet in linux
#!/bin/bash
## Internet connection shating script
sysctl -w net.ipv4.ip_forward=1
sysctl -p
iptables -X
iptables -F
iptables -t nat -X
iptables -t nat -F
iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -I FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -t nat -I POSTROUTING -o ppp0 -j MASQUERADE
@kostyll
Copy link
Author

kostyll commented Dec 20, 2014

http://www.hydro.washington.edu/~jhamman/hydro-logic/blog/2013/10/04/pybook-remote/

freesshd.com

192.168.1.2:/d/andrew on /media/dasha_d type nfs (rw,addr=192.168.1.2)

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