summaryrefslogtreecommitdiff
path: root/etc/iptables.sample
diff options
context:
space:
mode:
Diffstat (limited to 'etc/iptables.sample')
-rw-r--r--etc/iptables.sample23
1 files changed, 23 insertions, 0 deletions
diff --git a/etc/iptables.sample b/etc/iptables.sample
new file mode 100644
index 0000000..af60a63
--- /dev/null
+++ b/etc/iptables.sample
@@ -0,0 +1,23 @@
+# This file contains exported IP Tables data that can be read by the
+# iptables-restore(8) utility. It is not meant to be edited by hand
+# but regenerated by the iptables-save(8) utility after the necessary
+# changes were made via the respective iptables(8) commands.
+#
+# The IP Tables stored here implement a simplistic IP forwarding and
+# NAT between the `eth0` (virtual Ethernet, facing towards the host)
+# and `wlan0` (wireless networking) interfaces.
+
+*filter
+:INPUT ACCEPT [0:0]
+:FORWARD ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+[0:0] -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
+[0:0] -A FORWARD -i eth0 -o wlan0 -j ACCEPT
+COMMIT
+*nat
+:PREROUTING ACCEPT [0:0]
+:INPUT ACCEPT [0:0]
+:OUTPUT ACCEPT [0:0]
+:POSTROUTING ACCEPT [0:0]
+[0:0] -A POSTROUTING -o wlan0 -j MASQUERADE
+COMMIT