Guest User!

You are not Sophos Staff.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Connect server to the internet via VPN

Hi,

My ISP gives me a dynamic IP adres. That's ok for most things and I would like to keep it that way. I can also use IPv6, but they are also dynamic.
Just for 1 development server I have at home I need a static IP for the  directadmin control panel, and some other stuff.

I have a VPN with a static IP.

How can I configure my UTM 9 so my development server will use the VPN? (Just the development server) I don't want to use the VPN for my normal internet.

Directadmin says

Your server IP must be an external IP address. Local IP addresses (192.168.x.x or 10.0.x.x) will not work. The IP in your network device must be the same IP in your license file, as well as the public IP that connects to our system


Can someone put me on the right path?
Thanks! [:)]


This thread was automatically locked due to age.
  • If you want your dev-server to use the vpn let it build the connection itself.
    Just make sure your UTM doesn't block VPN traffic for your vpn-technology.

    It says, that the network device must have a public ip:
    You can try to install a vpn-client for your distro on that server and bind directadmin to the vpn interface. Don't know if this works, though.
  • I didn't think about that. I don't know if it's going to work but it's worth to try this.
  • Fred, if that worked, please share here.  If it didn't, can you do what's suggested here? (Dutch language)

    Cheers - Bob
    PS We mods can see the IP of the posters.  That page wasn't available in English.  I don't speak Nederlands, but I did work in France for almost six years.
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Fred, if that worked, please share here.  If it didn't, can you do what's suggested here? (Dutch language)

    Cheers - Bob
    PS We mods can see the IP of the posters.  That page wasn't available in English.  I don't speak Nederlands, but I did work in France for almost six years.


    I will do that Bob, I will start with it the next week.
    I don't have a business connection, just a normal home connection with a dynamic IP.

    I think I know how I can let it work. I will try it next week and let you know if I got it working or not and how I did it. [:)]
  • Ok, my initial approach would not work because the licensed IP need to be assigned in the server. And because I don't have a static IP at home I was hoping I could use my VPN with static ip.

    I ran into a few problems doing this.
    If I add the VPN IP to the server I get packet loss and time-outs.

    I can ping a few packets and then it stops. [:S]

    I started the setup of directadmin and it worked, but because of the packet loss / time-outs it could not download from directadmin servers.

    How can I best troubleshoot this problem?
  • Ok, I got the packet-loss problem solved, I removed all settings from the second network interface.
    Now I have

    /sbin/ifconfig
    eno1: flags=4163  mtu 1500
            inet 10.0.0.112  netmask 255.255.255.0  broadcast 10.0.0.255
            inet6 fe80::224:e8ff:fe58:4951  prefixlen 64  scopeid 0x20
            inet6 fec0::224:e8ff:fe58:4951  prefixlen 64  scopeid 0x40
            ether 00:24:e8:58:49:51  txqueuelen 1000  (Ethernet)
            RX packets 31707  bytes 16669912 (15.8 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 9585  bytes 942976 (920.8 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device interrupt 16  

    eno1:0: flags=4163  mtu 1500
            inet 10.0.0.114  netmask 255.255.255.0  broadcast 10.0.0.255
            ether 00:24:e8:58:49:51  txqueuelen 1000  (Ethernet)
            device interrupt 16  

    eno1:1: flags=4163  mtu 1500
            inet 5.175.***.***  netmask 255.255.255.0  broadcast 5.175.***.***
            ether 00:24:e8:58:49:51  txqueuelen 1000  (Ethernet)
            device interrupt 16  

    eno2: flags=4099  mtu 1500
            ether 00:24:e8:58:49:52  txqueuelen 1000  (Ethernet)
            RX packets 20983  bytes 1550837 (1.4 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 3319  bytes 483923 (472.5 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device interrupt 17  

    lo: flags=73  mtu 65536
            inet 127.0.0.1  netmask 255.0.0.0
            inet6 ::1  prefixlen 128  scopeid 0x10
            loop  txqueuelen 0  (Local Loopback)
            RX packets 536  bytes 60370 (58.9 KiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 536  bytes 60370 (58.9 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


    The 5.175.***.*** is my VPN IP
    I can start the install of directadmin, but it's unable to download from their servers trough that interface.
    It' can't work because I'm using the VPN IP in my interface.

    Any idea how I can let this work?
  • Fred, if I understand the requirements of directadmin, I think you may need a block of at least 3 fixed public IPs.  If you don't think that you do, and want to continue this thread, I'm still confused about the topology...

    The 5.175.***.*** is my VPN IP

    Do you mean that that's the public IP on the External interface?  What VPN technology are you using?  What is connected to what with the VPN tunnel?

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Fred, if I understand the requirements of directadmin, I think you may need a block of at least 3 fixed public IPs.  If you don't think that you do, and want to continue this thread, I'm still confused about the topology...


    Do you mean that that's the public IP on the External interface?  What VPN technology are you using?  What is connected to what with the VPN tunnel?

    Cheers - Bob


    Just 1 fixed IP is enough. I have it on my webserver in the datacenter with 1 IP.
    I also installed that one.

    But here at home I don't have a fixed IP and I'm behind NAT.
    That's the reason I was thinking about the VPN with Dedicated IP.
    But I don't know how I can do this...

    The 5.175.***.*** is my VPN IP, I have it set on the network interface of my development server and I made a static route 5.175.***.*** → Interface External (WAN) - IPv4 on my UTM

    But that doesn't seems to work.
     
    I did not try any VPN clients on my server because I don't think it wil work.
    The 5.175.***.*** IP has to be a public address on the development server. needs to be connected to the network interface.
    I'm not sure if this is possible. I think it is, but my knowledge about that is not good enough.
  • Yes, since the data center already has a network of public IPs, you only need one there.  At home, you would need to create a public network.

    The 5.175.***.*** is my VPN IP, I have it set on the network interface of my development server and I made a static route 5.175.***.*** → Interface External (WAN) - IPv4 on my UTM

    I don't understand.  If the following is off base, then please add a diagram of what's where with which IP and what VPN you are using.

    I'm making the following suggestion based on this understanding: you have a server at home that you want to manage using DirectAdmin.  For the license you need to have a fixed public IP on the server.  You can't get a fixed IP at your home, but you can organize to have an IP routed to you from somewhere else.

    If the IP on your server is 5.175.x.2, add an Interface with an address of 5.175.x.1 and a netmask of /30.  Add a firewall rule like 'Internet -> Any -> {5.175.x.2} : Allow'.  Connect this interface to your server and you're done.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Ok, Ill try to explain

    From the internet first you have the cable modem /router. Controlled by my ISP. I can't change the settings. It has a dynamic public IP address. 84.196.***.** The IPv6 addresses are also dynamic.
    Because it's also a router it gives my UTM external interface a 192 IP address. (192.168.0.219)
    Behind that is my UTM 9.3  Local IP 10.0.0.111
    It gives local pc's Ip addresses from 10.0.0.1 to 10.0.0.255
     
    	External (WAN) - IPv4	
    
    [Up]
    on lag0 [192.168.0.219/24 | 2a02:1810:505:4d00:222:4dff:fe7b:e52a/64]
    MTU 1500 · DEFAULT GW 192.168.0.1 | fe80::5e35:3bff:fe39:45da
    IPv4 Default GW
     
    EditDeleteClone
    External (WAN) - IPv6
    [Up]
    on lag1 [192.168.0.177/24 | 2a02:1810:505:4d00:211:50ff:fee7:b633/64]
    MTU 1500 · DEFAULT GW 192.168.0.1 | fe80::5e35:3bff:fe39:45da
    IPv6 Default GW
     
    EditDeleteClone
    Internal
    [Up]
    on eth0 [10.0.0.111/24 | fec0::/64]
    MTU 1500


    My development server has the following IP's

    /sbin/ifconfig
    
    eno1: flags=4163  mtu 1500
            inet 10.0.0.112  netmask 255.255.255.0  broadcast 10.0.0.255
            inet6 fe80::224:e8ff:fe58:4951  prefixlen 64  scopeid 0x20
            inet6 fec0::224:e8ff:fe58:4951  prefixlen 64  scopeid 0x40
            ether 00:24:e8:58:49:51  txqueuelen 1000  (Ethernet)
            RX packets 31707  bytes 16669912 (15.8 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 9585  bytes 942976 (920.8 KiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
            device interrupt 16  

    eno1:0: flags=4163  mtu 1500
            inet 10.0.0.114  netmask 255.255.255.0  broadcast 10.0.0.255
            ether 00:24:e8:58:49:51  txqueuelen 1000  (Ethernet)
            device interrupt 16  

    eno1:1: flags=4163  mtu 1500
            inet 5.175.***.***  netmask 255.255.255.0  broadcast 5.175.***.***
            ether 00:24:e8:58:49:51  txqueuelen 1000  (Ethernet)
            device interrupt 16 


    The 5.175.***.*** is the same IP then my VPN provider gave me to connect to. Because I need that IP in the server for the license.
    That doesn't work on the server. The 10.*.*.* addresses are working.

    My VPN Provider gave me an IP to connect to 5.175.***.***
    If I start a VPN client on my pc I can surf the web with 5.175.***.*** as my public IP.

    I added that IP in my Directadmin license. And Directadmin requires that you have a Public IP on your server.

    In order for DirectAdmin to be able to run on your system, 3 things must be true:
    

    1) The licensed IP must exists on the box.  Type /sbin/ifconfig, and you must see the licensed IP in the output.

    2) The licensed IP must function and be able to be bound to, eg:
    wget --bind-address=1.2.3.4 www.directadmin.com/index.html


    3) the IP that connects to our server must be the licensed IP.


    If you only have a LAN with 192.168.x.x or 10.x.x.x IPs on it, they would not satisfy rule number 1 and 2.

    But they have a little note about LAN behind point 3 (I'm probably not allowed to post the direct link to that page here) so you can go from this page.
    What are the IP requirements for DirectAdmin to run?