forked from zentralwerk/network
8 lines
226 B
Bash
8 lines
226 B
Bash
#!/bin/sh
|
|
|
|
if [ "$IFACE" = "{{ interface }}" ]; then
|
|
{%- for fwd in ports %}
|
|
iptables -t nat -A PREROUTING -i {{ interface }} -p {{ fwd.proto }} --dport {{ fwd.port }} -j DNAT --to-destination {{ fwd.to }}
|
|
{%- endfor %}
|
|
fi
|