sami
New Member
Posts: 9
|
Post by sami on Aug 17, 2015 19:19:12 GMT
Hello! I decided to give test driver to M0n0wall to replace the existing router/firewall hardware on my home office. Due to the obvious reasons I switched to Smallwall right at the beginning. My hardware is on Windows 2012 R2 with Hyper-V, so the plan was to virtualize Smallwall among other virtual servers. I got the 1.8.3 generic-pc iso and after a quick spin, it was installed to Hyper-V virtual hard disk. But then I ran into a issues. As the Smallwall console is limited to a few commands I wasn't able to have network interfaces listed nor configured at first. It would be nice to have also some kind of dmesg output available on the console to get idea what is recognized and what's missing. It turned out that, at least, Hyper-V network adapter is not recognized at all. To resolve this issue, Hyper-V providers Legacy Network adapter (Smallwall identifies it as a Digital 21140A Fast Ethernet nic). With the legacy adapter I got the nic for Smallwall. But as the one major reason for router/firewall replacement was to get gigabit ethernet connectivity to both LAN and WAN, this seems to be no-go for now. Second issue with Hyper-V Legacy Network adapter is that it does not support VLANs. That I can bypass with having one NIC for each of the VLANs. I'm not sure if this helps, but Microsoft has recently released Linux Integration Services Version 4.0 for Hyper-V, www.microsoft.com/en-us/download/details.aspx?id=46842 . I have version 4.0.7, but the latest seems to be 4.0.11. Maybe it contains also drivers needed to support Hyper-V network Interfaces? But anyway, the questions in short: Would it be possible to have Smallwall to support Windows 2012 R2 Hyper-V Network Adapters (not Legacy Network Adapters), too?
|
|
|
Post by Lee Sharp on Aug 17, 2015 20:32:03 GMT
Why, oh why, of all the network cards out there, did Microsoft choose the Dec Tulip chipset? I still have nightmares about that damn card from my Compaq days and that was back in 98! If you look back in the old m0n0wall mailing list you will find an e-mail from me about those horrible cards and what has to be done to make them work properly... But as to your issue... No the Linux drivers do not help. Luckily, they also made FreeBSD drivers. wiki.freebsd.org/HyperV Of course, they are not already in 8.4 which is what SmallWall is based on right now. That said, I can probably stick them in, but they would need to be compiled on a hyper-v system first, and I do not have one of those. (I have Xen, KVM and VMware, but no Hyper-V) So, if you or someone you know wants to get into the world of SmallWall development, I would be glad to help you! You would need to start by setting up a development environment of FreeBSD 8.4 on Hyper-V www.smallwall.org/docs/dev/image-guide.html#idp3095440 Then we can try and compile the drivers here svnweb.freebsd.org/ports/head/emulators/hyperv-is/ and see if we can get the internal nics working. Then we plug them into the image and see if we can detect them.  Then we release that image as a beta for testing, and you get lots of credit, and make tones of money! (Well, perhaps not that last part)
|
|
sami
New Member
Posts: 9
|
Post by sami on Aug 19, 2015 14:55:52 GMT
I'll try to investigate how to install separate Smallwall + FreeBSD 8.4 on the Hyper-V for this case. Not so far time ago I had FreeBSD running on another server, but I'm not (yet) familiar with the compiling stuff under FreeBSD. I'll get back soon to report if there was any progress.
|
|
|
Post by Lee Sharp on Aug 19, 2015 17:32:50 GMT
I can help you with it. You just need to install and patch up FreeBSD 8.4, then we can install the drivers. Once your 8.4 is running with the hyper-v nics, we can try pulling them out and putting them in smallwall.
|
|
sami
New Member
Posts: 9
|
Post by sami on Aug 19, 2015 19:30:20 GMT
I sent email....
|
|
|
Post by michiel on Sept 14, 2015 12:27:23 GMT
Hi, I'm not sure of this is still an issue, but I might be able to help. I'm running a number of Hyper-V servers and could install a FreeBSD VM.
I've been running m0n0wall for a number of years and was sad to find out its develompent had stopped. Finding SmallWall made me smile again :-)
|
|
|
Post by Lee Sharp on Sept 14, 2015 16:41:21 GMT
I have not been devoting the time to this I would have liked to. (Between my food on the table job, and some personal hard drive failures, I have been a tad busy) But what I have found is that Hyper-V support in 8.4 is a bit of a mess. It is much better in 10, and when we go there, it will be much more solid. But backporting to 8.4 is a challenge. I am working on it, however, and yes, your offer of assistance is appreciated. Send me an e-mail, and we can coordinate it... But no rush, as I have to deploy a XEN cluster with nas4free network storage this week, and it may take a bit of my focus. 
|
|
sami
New Member
Posts: 9
|
Post by sami on Sept 21, 2015 20:28:32 GMT
Hello!
I managed to "inject" Hyper-V modules to the Smallwall installation at least that Hyper-V network driver (not the legacy one) is working. Here how to do it:
1) Have Hyper-V modules ready and installed on FreeBSD 8.x server on same lan where the Smallwall installation is. This assumes you have it already installed as a Hyper-V virtual server and on Hyper-V provided virtual disk. 2) Boot your Smallwall with Freebsd 10.x ISO disk 3) Enter to single user mode 4) Mount Smallwall gw disk to /mnt using mount -o rw /dev/da0a /mnt 5) Get following loader.conf over network to /boot/loader.conf. (not sure if this is actually needed!)
# Loader labels for Hyper-v BIS drivers -do not modify hv_vmbus_load="YES" hv_utils_load="YES" hv_storvsc_load="YES" hv_netvsc_load="YES" hv_ata_pci_disengage_load="YES" # Loader labels for Hyper-V KVP drivers -do not modify hv_kvp_load="YES"
6) Put following lines _between_"load -t mfs_root /mfsroot" and "boot"
load /boot/modules/hv_vmbus.ko load /boot/modules/hv_utils.ko load /boot/modules/hv_storvsc.ko load /boot/modules/hv_netvsc.ko load /boot/modules/hv_ata_pci_disengage.ko
6.3 Create folder /boot/modules
6.6 Download kernel modules from another host using sftp ifconfig da0 up ifconfig da0 192.168.1.1 netmask 255.255.255.0 cd /boot/modules sftp username@anotherserver get hv_vmbus.ko get hv_utils.ko get hv_storvsc.ko get hv_netvsc.ko get hv_ata_pci_disengage.ko
7) umount /mnt using cd / ; umount /mnt 8) Boot. You should now see those modules being installed between Freebsd kernel load and acpi.ko module load. 9) Remove legacy network adapters from Hyper-V console. Add (normal) network adapters to smallwall gw. Reboot again. 10) You should now see hn-adapters on the Hyper-V 1)Interfaces: Assign network ports page. Update settings accordingly and reboot again 11) Ready. Even the Smallwall configuration stays intact.
Then have some testing...
|
|
|
Post by Lee Sharp on Sept 22, 2015 3:32:03 GMT
I am lost since the paths you are talking about do not match up with the SmallWall image. Also, I am not seeing the transfer of any .ko files that are not in SmallWall by default. Could you give a bit more detail?
|
|
sami
New Member
Posts: 9
|
Post by sami on Sept 22, 2015 15:28:27 GMT
hyper-v-kernel-modules.txt (51.4 KB) I updated previous post to clarify. The path /boot/modules was created by me. I'm not sure is this is needed, but I was assuming that those kernel modules might be needed to locate on exactly same location as what they were at the (kernel) development server. Also I missed yesterday how to transfer the files. You can download the kernel modules from the link above. I haven't been able to test those much, but the Smallwall has been up at least 18 hours so far. You can decode the text file with command "uudecode" and the pasteing the whole .txt file from console/putty/ssh/etc. It should then create modules.tar.gz file containing those pre-compiled kernel modules. For checksum, test that: sum modules.tar.gz 7307 37 modules.tar.gz
|
|
|
Post by Lee Sharp on Sept 22, 2015 17:42:48 GMT
Got it. I will try and get a quick and dirty testing image up today.
|
|
sami
New Member
Posts: 9
|
Post by sami on Sept 24, 2015 16:32:00 GMT
Some more test results: I got another ipv6 tunnel from sixxs.net. After putting the tunnel details to Smallwall WAN IPv6 configuration, I got IPv6 connectivity within a two seconds. It took almost same time to have static IPv6 addresses set up in the LAN segment. So, at least from my point of view, the Hyper-V kernel modules seems to work a bit, at least.
|
|
|
Post by Lee Sharp on Sept 24, 2015 18:18:25 GMT
Still working on that image. I am trying to put things in the expected place, not the Microsoft interpratation of the correct place. 
|
|
|
Post by michiel on Nov 17, 2015 20:36:27 GMT
I there any news on this? I have been swamped with work lately, but would now like to resume some testing with SW.
SAmi, could you zip-up a Hyper-V SW machine so I could us it for some tests, or is there a working SW image available?
|
|
|
Post by Lee Sharp on Nov 17, 2015 21:49:45 GMT
I have been focusing on the VPN issues, the ez-ip update, and that darned job thing that keeps getting in the way.  And Actually, Andy has been working the VPN issues, and I have been focusing on EZ-IP update... Sigh... If only I could quit my job and still get paid. 
|
|