johnklug n00b
Joined: 17 Jun 2013 Posts: 31
|
Posted: Mon May 02, 2016 1:42 am Post subject: [SOLVED] iptables command won't forward a port |
|
|
I am trying to redirect TCP 443 to 8443.
strace -f -o /tmp/trace.txt iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443
iptables: No chain/target/match by that name.
22056 socket(PF_INET, SOCK_RAW, IPPROTO_RAW) = 4
22056 fcntl(4, F_SETFD, FD_CLOEXEC) = 0
22056 getsockopt(4, SOL_IP, 0x40 /* IP_??? */, "nat\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., [84]) = 0
22056 getsockopt(4, SOL_IP, 0x41 /* IP_??? */, "nat\0H\177\0\0X\\\257FH\177\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., [824]) = 0
22056 setsockopt(4, SOL_IP, 0x40 /* IP_??? */, "nat\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 1096) = -1 ENOENT (No such file or directory)
22056 close(4) = 0
22056 write(2, "iptables: No chain/target/match "..., 46) = 46
So is there something I have to do to create the NAT table?
# zgrep -E '^[^#]' config-3.17.7-gentoo | grep NF_CONN
CONFIG_NF_CONNTRACK=y
CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_PROCFS=y
CONFIG_NF_CONNTRACK_FTP=y
CONFIG_NF_CONNTRACK_IRC=y
CONFIG_NF_CONNTRACK_SIP=y
CONFIG_NF_CONNTRACK_IPV4=y
CONFIG_NF_CONNTRACK_PROC_COMPAT=y
CONFIG_NF_CONNTRACK_IPV6=y
Last edited by johnklug on Sat May 14, 2016 9:11 pm; edited 1 time in total |
|