Recommended Posts

I just want someone to work through this with me to make sure I'm not going to be wasting my time implementing it.

I currently run a Linux server running ddclient for a DDNS service (afraid.org) among other services, and does not currently have a VPN client.

I am planning on installing a VPN client which would cause ddclient to stop reporting the correct IP to the DDNS. So I was going to run a virtual machine on eth1 (non-VPN) running ddclient and have the full server running on eth0 (VPN). That way ddclient is reporting the correct wan IP for my connection, then port forwarding to the local IP should allow the domain to see the web services/ssh/etc remotely while keeping other network traffic protected by the VPN... or at least that's what I am imagining.

Can anyone tell me if I over-thought this or if this will actually work?

Thanks!

Link to comment
https://www.neowin.net/forum/topic/1124036-webserver-behind-vpn-client/
Share on other sites

port forwarding to what IP, the VMs IP?

If I hit you from say 24.13.a.b to your publicIP.nonvpn to be forwarded to your webserver. When your webserver answers back if default route to internet is through vpn -- it will go back through the vpn to answer me on 24.13.a.b

I don't think my box would like the connection coming from a different IP, etc.

Now if webservices/ssh going to run on the vm your fine - and you don't even need a second nic for that. Just bridge the VM to your 1 physical nic on the server so it gets an IP in your private network.

Port forwarding to the VPN protected IP.

The reason I'm doing this is there are some applications that need to be run behind the VPN but I need to be able to access them remotely. Is there another way of doing that?

This is a full fledged enterprise rackmount server, so it has the two nics built in already. I was going to trunk them for redundancy but if I have to run them independent to get this working that's okay.

I see what you're saying about the different IP responding. Didn't really think of it that way... There has to be a way to do this though.

The bit I'm confused with is a VPN client on the same server as (afraid.org)? Do you not mean install a VPN server on the same server as (afraid.org)?

Do you want (afraid.org) on the WWW for everyone or only accessed by VPN? If only by VPN then DDNS will only help you get to the VPN WAN IP not (afraid.org) and so VPN DNS server will have to point you to (afraid.org) by VPN LAN IP.

afraid.org is the DDNS provider. I want specific ports available to web access instead of being behind the VPN client. However the other traffic those applications create need to be behind the VPN.

So you do want (afraid.org) on the WWW for everyone and connect to this server by VPN for other things? In which case you need a VPN server (not client) setup on (afraid.org) and this will not affect DDNS in pointing to (afraid.org) by WAN IP.

@PeterUK, I think he just wants to know if he can segment his 2 NICs so that some traffic (vpn) is bound/routed via NIC #1 and all other traffic (non-vpn) is bound/routed via NIC #2.

@OmegaHack, it sounds like you're talking about proxying 2-way VPN traffic thru NIC #1 while allowing non-VPN traffic thru NIC #2 undisturbed. If that's the case, then it shouldn't be a problem -- provided that all client/server services are explicitly bound to the appropriate ethX device.

(For reference, this bifurcation is very typical for managed environments since the secondary Ethernet device can either serve a different VLAN or even upstream provider [think back-up/spare network bandwidth].)

Edit: bold-faced "proxying" since the OP wants more to proxy than to necessarily port-forward

@PeterUK I don't think you understand. freedns.afraid.org is the service I have my dynamic DNS through, ddclient is the application that gives my WAN IP to freedns.afraid.org so that a domain that I have points to my WAN IP. I am trying to set up a VPN client on here to protect the data that is sent/received by the applications running on the server. I need to be able to access certain ports on that server for those applications though. If I run ddclient on the primary server it will report the wrong (anonymous) IP address to freedns.afraid.org hence the VM to run ddclient on it's own ethernet device (I suppose I could just use a virtual switch though). So now the correct IP is being reported to the DDNS provider but will port forwarding on the router to the primary server allow me to access those specific ports/applications remotely. That is the question.

@NAS I am trying to leave the traffic on the VM undisturbed but also need to access certain ports on the primary system remotely.

If its the other way round as in (afraid.org) wants to connect to another VPN end point then you only need to disable for the VPN client do not use the remote gateway which will give you a LAN access to the other end without it affecting DDNS because you disabled the the VPN use the remote gateway option.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Rufus alternative Ventoy now supports Windows 11's mandatory update, fixes major boot bug by Sayan Sen While Microsoft has its own official Media Creation Tool used for making bootable USB media, there are some popular third-party utilities as well which offer additional options like bypassing system requirements, Microsoft Account creation, and more. One of these is Ventoy, and the software has received its latest update today. In fact, the app actually got a slew of updates over the last couple of days, three version releases in total, to be specific. The first release, version 1.1.13, was pulled as there was some unspecified error in the update, and as such, the corrected version 1.1.14 was pushed out. Following that on very short notice, 1.1.15 was published as well. For those unfamiliar, Ventoy is an open-source utility that lets users create a bootable USB drive once and then simply copy ISO, WIM, IMG, VHD, or EFI files onto it without repeatedly formatting the drive. It supports both legacy BIOS and UEFI boot modes, Secure Boot, and a wide range of operating systems, making it one of the most versatile tools in the category. The biggest change in version 1.1.14 is an updated Secure Boot shim file aimed at resolving the UEFI CA 2023 issue, which is basically a compatibility problem that has affected Secure Boot environments on some systems. If you recall, we reported about severe boot issues on HP devices following the release of updated Secure Boot 2023 keys. For anyone who may not be aware, back in early 2024, Microsoft announced that it was updating Secure Boot keys as they were going to become 15 years old in 2026, which is also when they are set to expire. As such, the new 2023 certificates have been rolling out with the newest Windows 11 updates. Updated boot manager and Secure Boot certificates are crucial for protection against malware like bootkits. These are mandatory updates. Alongside that, the VentoyPlugson graphical plugin configurator was updated in sync with the release. The update also introduces a new VTOY_SECURE_BOOT_POLICY option within the Global Control plugin, giving users more flexibility in managing Secure Boot behavior. Ventoy has also received a fix for a startup issue when Secure Boot was disabled. Microsoft does officially allow users to boot systems without Secure Boot as long as the PC is Secure Boot capable. The full changelog is given below: Update secure boot shim file to solve the UEFI CA 2023 issue. The new release use a new CA, so you need to enroll the new key for the first boot time. VentoyPlugson update synchronously. Global control plugin add a VTOY_SECURE_BOOT_POLICY option. Fix the boot issue when Secure Boot is disabled in the UEFI firmware. You can download the latest version of the app here on Ventoy's official GitHub repo or from Neowin software stories.
    • Windows 11 is fine, no issues on any of the machines I've run it on since release. The stricter security requirements are a good thing, sometimes the baseline needs to change and people will winge, but it is what it is. Happened with the move from 9x to NT - broke compatability Happened with XP SP2 when security started to become a serious consideration Certainly happend with Vista that brought in UAC, the concept of not running as admin (something that has been the norm in Linux/Unix from pretty much the start) and a completely new driver stack. Windows 11 will probably get looked back at as the point where even consumer and SMB IT was dragged kicking and screaming into a somewhat secure by default configuration.
    • Bluestacks has been emulating Android on Windows for fifteen years. It's janky and riddled with ads though, so WSA looked like it was going to be a huge improvement over the emulator experience. Too bad Microsoft dropped the ball on that.
    • Classic. China would be nothing without Western, Japanese, and South Korean technology.
    • The world is larger then your small viewpoint. Plenty of scientists care about this, especially those involved in space.
  • Recent Achievements

    • Rookie
      krychek57 went up a rank
      Rookie
    • Grand Master
      Jaybonaut went up a rank
      Grand Master
    • One Year In
      Philsl earned a badge
      One Year In
    • Dedicated
      Scoobystu earned a badge
      Dedicated
    • First Post
      Tom Schmidt earned a badge
      First Post
  • Popular Contributors

    1. 1
      +primortal
      441
    2. 2
      +Edouard
      172
    3. 3
      PsYcHoKiLLa
      134
    4. 4
      Michael Scrip
      78
    5. 5
      Xenon
      77
  • Tell a friend

    Love Neowin? Tell a friend!