Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    PfSense on Hyper-V, no network access.

    Scheduled Pinned Locked Moved Virtualization
    14 Posts 7 Posters 29.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I
      ironsavior
      last edited by

      Hi
      I have two problems with pfSense 1.2.3 on Hyper-V (Windows Server Core Enterprise 2008 R2).
      The VM is set up with 2 Legacy Network Interfaces which are connected to 2 different virtual networks on 2 physical network interfaces.
      It installs fine but when I select LAN and WAN it does not get an IP address from the WAN DHCP the first time.
      If I configure interfaces again it gets a IP just fine.
      This will happen every time i reboot the VM. But I plan to keep it up so that is not a major problem.

      The second problem however, is that I cannot get any network connections from or to the VM. Cannot connect to the WebUI or Ping other resources on the network.
      Has anyone had this problem on Hyper-V?

      Best Regards
      Thomas

      1 Reply Last reply Reply Quote 0
      • S
        sleeprae
        last edited by

        I had this same issue on an installation under 2008 R2's Hyper-V. It was occuring on both the DHCP WAN and LAN interfaces. My solution was to cycle each interface down and back up in an init script. Not elegant, but it seems to be reliable. It could be that your LAN interface is experiencing the issue as well, causing your second problem.

        1 Reply Last reply Reply Quote 0
        • M
          MrKoen
          last edited by

          Sleeprae, I'm experiencing the same problem with Hyper-V and pfSense. Care to share more detailed information on how you were able to get it to work? Thanks!

          1 Reply Last reply Reply Quote 0
          • M
            MrKoen
            last edited by

            I think I have figured it out already. A new world of Linux opens up for me as a Microsoft software enthusiast ;D For others being in the same situation:

            1. Connect to your pfSense installation, for example via the Hyper-V Manager and connecting to your instance
            2. In the pfSense menu choose option 8: Shell
            3. Execute ifconfig to show your network interfaces
            4. Execute ifconfig <interface name,="" eg="" de0="">down
            5. Execute ifconfig <interface name,="" eg="" de0="">up
            6. In case of using DHCP on the interface, execute dhclient <interface name,="" eg="" de0="">, when using a static ip, skip this step.
            7. Execute ping <ip>to test connectivity
            8. Execute exit when done to return to the pfSense menu

            Works like a charm here! Next step is to figure out if I have to do this after each reboot and if so, how to make sure it will be done automatically!  :)</ip></interface></interface></interface>

            1 Reply Last reply Reply Quote 0
            • M
              MrKoen
              last edited by

              And this one is solved as well. To make sure the reset of the interface gets done automatically on reboot, use vi to create a file <whatever_you_like_nospaces>.sh in /usr/local/etc/rc.d and make it contain:

              ifconfig <dhcp interface="">down
              ifconfig <dhcp interface="">up
              dhclient</dhcp></dhcp></whatever_you_like_nospaces>

              1 Reply Last reply Reply Quote 0
              • E
                Efonnes
                last edited by

                I have a patch for /etc/rc.bootup that I put up on a repository at https://rcs.pfsense.org/projects/pfsense/repos/VirtualPC_patches

                It is for 2.0, but should work on anything else by manually inserting the changes into /etc/rc.bootup.  The patch was made for Virtual PC/Server, which has a 4 interface limit; I don't know what the limit is on Hyper-V.  The array there just contains a list of the interfaces to bring up then down, so change it if appropriate.

                1 Reply Last reply Reply Quote 0
                • C
                  cmb
                  last edited by

                  On the couple hyper-v installs I've done I saw the same. The above mentioned hacks to ifconfig down/up the interface does work around it, but it seems it flakes out randomly and has to have that run again on occasion. I ended up upgrading them to 2.0 over 6 months ago and haven't had any problems since, the de driver has a work around for that in FreeBSD 8.

                  1 Reply Last reply Reply Quote 0
                  • M
                    MrKoen
                    last edited by

                    @cmb:

                    On the couple hyper-v installs I've done I saw the same. The above mentioned hacks to ifconfig down/up the interface does work around it, but it seems it flakes out randomly and has to have that run again on occasion. I ended up upgrading them to 2.0 over 6 months ago and haven't had any problems since, the de driver has a work around for that in FreeBSD 8.

                    I have my setup running for a little over a month now and haven't encountered any problems with the ifdown/ifup workaround. Did you place it in rc.d and not in the bootup folder? After some changes to pfSense through the webinterface, the connection gets reset. If you placed the workaround patch in any other place than rc.d, the workaround won't be applied after the connection reset. That might explain your unexplainable experience. If you place the workaround script in rc.d, it will be applied on a connection reset by pfSense and thus will remain working.

                    1 Reply Last reply Reply Quote 0
                    • S
                      spraynpray
                      last edited by

                      I'm getting the same thing right now, it says lan is 192.168.1.1 and wan is 0.0.0.0 I'm pretty sure the nic's are compatible because it works with the liveCD. ifconfig and dhclient don't help, it just lists a bunch of numbers and tells me the dhcp didn't give it an address, reassigning interfaces doesn't do anything either.

                      1 Reply Last reply Reply Quote 0
                      • B
                        berniem
                        last edited by

                        And did you try any or all of the suggested fixes above and in other threads?

                        1 Reply Last reply Reply Quote 0
                        • M
                          MrKoen
                          last edited by

                          spraynpray, first try to manually do an ifconfig down and up from the shell. That should do the trick already. Make sure your WAN side can handle the DHCP request and the DHCP server on the WAN side is not responding only to specific MAC addresses or host names like with some internet providers is the case.

                          1 Reply Last reply Reply Quote 0
                          • S
                            spraynpray
                            last edited by

                            @Koen:

                            spraynpray, first try to manually do an ifconfig down and up from the shell. That should do the trick already. Make sure your WAN side can handle the DHCP request and the DHCP server on the WAN side is not responding only to specific MAC addresses or host names like with some internet providers is the case.

                            Just called rogers, the tech said any MAC address would work, he gave me an example of any address letters a-f and numbers. I tried to set it on 'static' in hyperV with all the other options left on default, still didn't work.

                            Right now, pfsense is showing me:
                            LAN (intel 100ct) - 192.168.1.1 when it worked in liveCD, this was 192.168.1.199
                            WAN (de1 realtek) - 0.0.0.0 <- this is what I'm try to figure out how to get working…

                            1 Reply Last reply Reply Quote 0
                            • M
                              MrKoen
                              last edited by

                              spraynpray, are you absolutely sure you're using Legacy Network Adapters for all your NICs attached to your pfSense Virtual Server instance?

                              1 Reply Last reply Reply Quote 0
                              • S
                                spraynpray
                                last edited by

                                With the regular connection, pfSense wouldn't even show de0/de1 and ask me to install a network connection, so yes I'm definitely using legacy.

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post
                                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.