Score:0

PortForwarding with IP

cn flag
iptables -t nat -A PREROUTING -p tcp -m tcp --dport 5000 -j DNAT --to-destination 10.8.0.2
iptables -t filter -A INPUT -p tcp -d 10.8.0.2 --dport 5000 -j ACCEPT

I used the code above to forward port 5000 to OpenVPN, the port was forwarded but all the request to my server shows that the request is from localhost, is there a way to port forward with the user IP?

Doug Smythies avatar
gn flag
is forwarding enabled? `cat /proc/sys/net/ipv4/ip_forward` . Depending on the default policies, a FORWARD rule might be needed: `iptables -A FORWARD -p tcp -d 10.8.0.2 --dport 5000 -j ACCEPT` . Otherwise describe your setup in more detail.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.