How to route specific packets to specific interface or IP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am running a mailserver at home and also have a "real server" with a
static ip somewhere else. The real server runs an openvpn-server and
my router at home is connected to this vpn.  What I want is, that if
my mailserver sends anything over port 25, it will be routed over the
vpn tunnel to the real server, then there will be NATed and sent to
the destination. Also all packets incoming on port 25 on the real
server should be forwarded/NATed to the mailserver.

So as a first step I am trying to configure my router to send all
packets from source IP "Mailserver-IP" and with destination port 25 to
either the tun Interface or the openVPN IP. I have read iptables
documentation, but am unable to see the right way. Could anyone help
me out and turn me into the right direction?

Thanks for any help,

Martin
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux