Results 1 to 2 of 2
Hi to all, first topic here :P I have: - A dedicated server hosted in US, ip 126.96.36.199 - A VPS hosted in FR, ip 188.8.131.52 Both server have Linux/Debian, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-26-2012 #1
- Join Date
- Aug 2012
Forward outgoing request to a remote server only for some destinations
- A dedicated server hosted in US, ip 184.108.40.206
- A VPS hosted in FR, ip 220.127.116.11
Both server have Linux/Debian, and only one ip each (eth0)
What i need:
All outgoing traffic from 18.104.22.168 exit normally to internet,
EXCEPT for destination IP X,Y,Z,etc, that i want to be done by 22.214.171.124 server.
The 126.96.36.199 it's dedicated to this, and accept connections ONLY from 188.8.131.52.
I'm newbie about networking.
I understand i need to create "route" in 184.108.40.206, and
enabling IP forwarding with some iptables rule (nat? masquerading?) in 220.127.116.11.
It's possible to do with only one IP on 18.104.22.168?
Thanks for help!
- 08-26-2012 #2
Maybe this can help, the command you are looking for is called "route" and you can use it with the following options (I only show here whats relevant to your goals:
add a new route.
the destination network or host. You can provide IP addresses in dotted decimal or host/network names.
the target is a network.
the target is a host.
when adding a network route, the netmask to be used.
So the command would be something like:
route add -net 22.214.171.124 netmask 255.255.255.0 dev eth0