Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
25% Recurring Discount on NVMe VPS
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop

In this Discussion

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.

Redirect traffic from secondary VPS IP to a private VPN IP

Hi, I have one VPS with 2 IP addresses and I wouls like to use secondary IP and forward all traffic to a internal private IP (in fact is an VPN ip inside of my home network).

Example --> Forward all traffic to IP 80.10.10.1 to internal IP --> 192.168.25.2

[root@d ~]# sysctl -p
net.ipv4.ip_forward = 1

So in the public VPS I'm using csf and webmin (openVZ).

çWhat's the easiest way to do this ?

Can I just use /etc/csf/csf.redirect to do this ?

Thanks.

Comments

  • CryckCryck Member
    edited July 2015

    I would solve this with IPtables.

    iptables -t nat -A PREROUTING -p tcp -i eth0 -d 1.2.3.4 -j DNAT --to-destination 10.11.12.13
    iptables -t nat -A PREROUTING -p udp -i eth0 -d 1.2.3.4 -j DNAT --to-destination 10.11.12.13

    This rules redirect all incoming TCP and UDP traffic to your internal IP.

  • KeyJeyKeyJey Member

    Won't csf interfere with this ? thanks

Sign In or Register to comment.