Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 2 VPS in 2 locations. The first vps is located in Iran and has the ip : A.A.A.A. The second vps is located in the USA and has the ip : B.B.B.B.

I run pptp/l2tp on server 1 and my VPN users connect to it through the valid ip : A.A.A.A. Also, I run openvpn on server 2 (B.B.B.B).

I want to connect server 1 to 2 and forward all traffic to server 2. In other words , when my users connect to server 1(A.A.A.A), they can use the internet of server 2 with ip B.B.B.B.

I also tried to connect server 1 to 2 with openvpn with "redirect-gateway def1" but when it connected completely, it lost its valid ip A.A.A.A and my clients cannot ping A.A.A.A...

How do I get this to work?

Thanks.

edited : i can connect 2 server via openvpn "site so site" , and they can ping Each other without losing valid ip , but i cannot redirect traffic from server A.A.A.A to B.B.B.B

share|improve this question

1 Answer 1

I don't think you're doing this correctly. You need to redirect the pptp traffic on BBBB, not the openvpn traffic.

share|improve this answer
    
It might be more useful to the OP to include more specific recommendations that might help him solve his problem. –  Katherine Villyard Jan 17 at 21:44
    
Yes, that's true. But look here, we don't have any information as to OS or software implementation. I'm very skilled in using OpenVPN on both Windows and Linux, but PPTP implementations will vary. I also took note that our OP has a box in Iran, and that wipes out a whole array of possibilities by the fact that the government there will literally put a whip to the back of anyone trying to use OpenVPN. We can only do what we can. –  codenoire Jan 18 at 1:06
    
The question is tagged linux. –  Katherine Villyard Jan 18 at 2:26

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.