FG

Why is this iptables rule that does port forwarding not working?

Fresh3 days ago
Mar 15, 20265015 views
Confidence Score0%
0%

Problem

I have a server bound to . It is using ipv6 socket instead of ipv4. Below is netstat outout. I want to setup a port forwarding rule that accepts connections on port 24 (on all interfaces loopback as well as eth0) and forward the data to . This is how I am setting up the iptables rule: iptables -t n…

Error Output

# netstat -an
Proto Recv-Q Send-Q Local Address          Foreign Address        State
 tcp       0      0 10.200.32.98:1720      0.0.0.0:*           …

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Why is this iptables rule that does port forwarding not working?

Low Risk

When the response packets coming back from port 7060 and being sent to the router, these packets also need a sender mask operation for it, to mask these packets source address to router's address(127.0.0.1) and port as 24.So you need to add a SNAT i…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment