ubuntuusers.de

iptables issue

Autor:
NicTheQuick
Datum:
22. November 2016 17:10
Code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Neue Chains erstellen
iptables -t nat -N lxd-prerouting
iptables -N lxd-forward

# Jumps in die Tables erstellen
iptables  -t nat -A PREROUTING  -j lxd-prerouting
iptables -A FORWARD -j lxd-forward

# NAT routing erstellen
iptables -A lxd-prerouting -t nat -i eth0 -p tcp -m tcp --dport 2204 -j DNAT --to-destination 10.100.19.104:22

Fehlermeldung:
iptables: Invalid argument. Run `dmesg' for more information.

dmesg:
x_tables: ip_tables: DNAT target: used from hooks INPUT, but only usable from PREROUTING/OUTPUT