Score:0

send traffic through same interface as traffic came

kr flag
seb

internet -- proxy (tunnel0) -- internet -- (tunnel0) server (eth0) -- internet

Server default route is eth0.

Proxy forwards UDP (port 6300) traffic to server correctly, but server replies on eth0. I need server to reply on the original interface.

Right now server has no iptables. I need to define iptables so that server replies to traffic the same way it came from. Traffic coming through tunnel0 should be replied to through tunnel0.

Server is ubuntu 18.04. Proxy is transparent, thus source IP is preserved (there is no NAT).

proxy's iptables (server tunnel0 IP: 10.0.0.1)

iptables -t nat -A PREROUTING -p udp -i eth0  --dport 6300 -j DNAT --to-destination 10.0.0.1:6300

tcpdump on proxy tunnel0 shows internet traffic to UDP/6300 going in tunnel tcpdump on server tunnel0 shows internet traffic to UDP/6300 coming in tcpdump on server shows response traffic from eth0/UDP/6300 to original client

Any pointers greatly appreciated. Please note, the issue is not there with TCP traffic. TCP traffic comes back the way it came with no issue and no additional config.

djdomi avatar
za flag
i think theres no routing for 10/8 to the correct destination
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.