New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Mirror OpenVPN ports
Hello,
Up until recently I've been operating several OpenVPN servers on systems with one IP configured. I run OpenVPN on UDP port 1194 but need to mirror the service to UDP port 53, the following rule does this fine.
iptables -t nat -A PREROUTING -p udp -d 8.8.8.8 --dport 53 -j REDIRECT --to-port 1194
However recently I've tried to get the same setup working on a system with multiple IPs configured. I have 3 IPs, each configured on eth0 eth0:1 and eth0:2 respectively.
Having minimal knowledge of iptables myself and having already tried several rules, I am hoping somebody here can shed some light on how to get this working.
Jack
Comments
should work for you
Should work...
@AutoSnipe didn't work, not sure why.
@joodle my issue is that OpenVPN is listening on an additional IP and that rule forwards to the default IP.
I've got it working on both ports by binding OpenVPN to the default system IP and setting two rules to forward traffic from the additional IP to the default IP for those ports.
Thank you both for your input.