aboutsummaryrefslogtreecommitdiff
path: root/source/notes/2016-12-13-nat.md
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2017-06-20 19:03:17 +0200
committerneodarz <neodarz@neodarz.net>2017-06-20 19:03:17 +0200
commit6dbdf013628321f9996efe4a90eaa03b8a8875a4 (patch)
tree0d48ee911685c9170ee7750b5cc21e117918a5d5 /source/notes/2016-12-13-nat.md
parente11b17c3265cca97b244fa368391cdfe8dd182f0 (diff)
downloadmy_new_personal_website-6dbdf013628321f9996efe4a90eaa03b8a8875a4.tar.xz
my_new_personal_website-6dbdf013628321f9996efe4a90eaa03b8a8875a4.zip
Fork of wiki.neodarz.net
Diffstat (limited to 'source/notes/2016-12-13-nat.md')
-rw-r--r--source/notes/2016-12-13-nat.md30
1 files changed, 30 insertions, 0 deletions
diff --git a/source/notes/2016-12-13-nat.md b/source/notes/2016-12-13-nat.md
new file mode 100644
index 00000000..005320cf
--- /dev/null
+++ b/source/notes/2016-12-13-nat.md
@@ -0,0 +1,30 @@
+---
+title: "nat"
+date: 2016-12-13T09:14:00
+date_display: Dec 13, 2016
+---
+
+Mise en place du NAT sur archlinux :
+
+
+```sh
+# ip link set up dev net0
+# ip addr add 192.168.123.100/24 dev net0
+# sysctl net.ipv4.ip_forward=1
+# iptables -t nat -A POSTROUTING -o internet0 -j MASQUERADE
+# iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
+# iptables -A FORWARD -i net0 -o internet0 -j ACCEPT
+```
+
+Mise en place d'une ip fixe sur debian :
+```sh
+# ifconfig eth0 192.168.123.101 netmask 255.255.255.0
+# route add default gw 192.168.123.100 eth0
+```
+
+Sources :
+
+- [https://wiki.archlinux.org/index.php/Internet_sharing](https://wiki.archlinux.org/index.php/Internet_sharing)
+
+- [http://www.howtogeek.com/118337/stupid-geek-tricks-change-your-ip-address-from-the-command-line-in-linux/](http://www.howtogeek.com/118337/stupid-geek-tricks-change-your-ip-address-from-the-command-line-in-linux/)
+