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'm trying to setup a vpn server with an old box I have at my office. I only have a single ethernet port and saw on reddit that it was possible to use only one to create a vpn server.

The problem is that my router is set at 192.168.1.1 and in /etc/openvpn/server.conf I have server 192.168.1.0 255.255.255.0. It automatically sets the TUN interface to 192.168.1.1 and I think thats is conflicting with the router IP. Is there a way around that by possibly setting that ip to be different?

share|improve this question
    
What exactly are you trying to accomplish with this VPN setup? This seems a bit strange for a business environment. –  Magellan Feb 2 '12 at 1:24
    
I don't think it's that odd: I've seen it a number of times with very small businesses, where someone would like remote access to work files. One SMB consultant I know actually flashes Linksys routers for these business with something like DDWRT so it can run OpenVPN for this sort of access. –  cjc Feb 2 '12 at 3:21

1 Answer 1

Edit /etc/openvpn/server.conf and change the line to server 192.168.2.0 255.255.255.0 then. You will need to add some static routes on the router, in that case, so that machines inside your network will know to use the openvpn server to find the VPN clients.

You can also set up openvpn to use TAP instead of TUN. Here are some instructions:

http://openvpn.net/index.php/open-source/documentation/miscellaneous/76-ethernet-bridging.html

In this case, the openvpn clients will be bridged to your internal LAN, and will use your routers DHCP server to get addresses. In that case, your networks won't conflict, as it will all appear to be on the LAN.

share|improve this answer

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.