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

I did my own VPN setup on a CentOS box and it's working very nice and smooth. However I would like to add a feature that I open a specified port on the box for the incoming traffic that should be routed back to the connected client.

The service is only for me, however my home IP is not fix. My first idea would be to use a fix locale IP address on the box for the incoming traffic will be routed to. When I connect to the VPN service it should generate a rule to route everything from that fix IP to the connected client.

Is this how it should be done? How do I do that?

share|improve this question
    
Does OpenVPN give out a fixed RFC1918 address to the connected client? –  MadHatter Jun 19 '13 at 7:40
    
I can opt for that. However I could just open ports for the whole vpn subnet, right? I mean for every joined client there is a local virtual address generated. If I cover the whole subnet with that rule it should work. I just forgot about these virtual address and I was focusing on the fact that my home IP is dynamic. –  p1100i Jun 19 '13 at 7:56
    
If you're the only person using the openvpn then you'll almost certainly get the same RFC1918 address each time anyway. I'd investigate using that address to do the port-forwarding - which will cause the traffic to be routed over the VPN - rather than using the dynamic real address, anyway. –  MadHatter Jun 19 '13 at 8:02

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.