{"id":452,"date":"2026-03-31T00:31:46","date_gmt":"2026-03-31T00:31:46","guid":{"rendered":"http:\/\/blog.ltzs.us\/?p=452"},"modified":"2026-03-31T00:31:46","modified_gmt":"2026-03-31T00:31:46","slug":"gargoyle-in-a-vm-on-a-usff-pc-running-proxmox-with-eth0-as-lan-and-wifi-as-wan","status":"publish","type":"post","link":"http:\/\/blog.ltzs.us\/?p=452","title":{"rendered":"Gargoyle in a VM on a USFF PC running Proxmox with eth0 as LAN and wifi as WAN"},"content":{"rendered":"\n<p>The problem:<br>My router (WDR4300) was overloaded with 30ish concurrent clients and 240ish quotas to keep track of, and load was way too high.<\/p>\n\n\n\n<p>Option 1: Switch to a Draytek router with quota mangement<br>Option 2: Buy a USB-&gt;Ethernet adapter and virtualize Gargoyle on Proxmox on a 4th gen intel processor<br>Option 3: Set up VLANs on a OpenWRT router and pass tagged traffic to and from the virtualized Gargoyle router using the single ethernet port<\/p>\n\n\n\n<p>1) and 2) are en route, but in the meantime, internet traffic is slow and the router is struggling. I thought about how proxmox doesn&#8217;t really use wifi, so the PCI wifi card would be available to pass through to a OpenWRT-based VM, and thus would have two network interfaces to avoid having to learn how to do vlans.<\/p>\n\n\n\n<p>Make the wifi card available to VMs by editing <mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>nano \/etc\/default\/grub<\/code><\/mark>, adding <mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>intel_iommu=on<\/code><\/mark> to GRUB_CMDLINE_LINUX_DEFAULT (goes inside the quotes with a space in between any other text), run <mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>update-grub<\/code><\/mark>, and reboot.<\/p>\n\n\n\n<p>Using gargoyle-pl as a base, was able to install onto a VM with the following procedure:<\/p>\n\n\n\n<p>On the proxmox host:<\/p>\n\n\n\n<p><mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>wget https:\/\/dl.eko.one.pl\/gargoyle-pl\/1.15\/targets\/x86\/64\/gargoyle-1.15.0.4-generic-ext4-combined.img.gz<\/code><\/mark><\/p>\n\n\n\n<p><mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>gunzip ~\/gargoyle-1.15.0.4-generic-ext4-combined.img.gz<\/code><\/mark><\/p>\n\n\n\n<p>Create a new VM with the following settings:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>OS:<\/strong> Do not use any media.<\/li>\n\n\n\n<li><strong>System:<\/strong> Default settings.<\/li>\n\n\n\n<li><strong>Disks:<\/strong> Delete the default disk.<\/li>\n\n\n\n<li><strong>CPU:<\/strong> 1 or 2 cores (Host type is usually best for performance).<\/li>\n\n\n\n<li><strong>Memory:<\/strong> 512MB to 1GB is plenty for Gargoyle.<\/li>\n\n\n\n<li><strong>Network:<\/strong> * <strong>net0:<\/strong> This will be your <strong>LAN<\/strong> (attached to your internal bridge, usually <code>vmbr0<\/code>).<\/li>\n<\/ul>\n\n\n\n<p>In the proxmox host shell:<\/p>\n\n\n\n<p><mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>qm importdisk 100 ~\/gargoyle-1.15.0.4-generic-ext4-combined.img local-lvm<\/code><\/mark> (or whatever VM id you have)<\/p>\n\n\n\n<p>Go back to the Proxmox Web UI. Select the VM -> Hardware. You will see an Unused Disk. Double-click it and click Add. Go to Options -> Boot Order. Move the new disk to the top and ensure it&#8217;s checked.<\/p>\n\n\n\n<p>With the pl version of gargoyle, you have access to package manager and a way to install them using opkg. But since the eth0 is associated with LAN, not WAN, the VM won&#8217;t have internet access because it wants to serve the LAN. To get around this temporarily, use the convenient console in proxmox (this makes it much easier to configure when no route to the host exists)<\/p>\n\n\n\n<p><mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>udhcpc -i br-lan<\/code><\/mark><\/p>\n\n\n\n<p><mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>route add default gw 192.168.1.1 br-lan<\/code><\/mark> (or whatever your gateway is)<\/p>\n\n\n\n<p><mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>echo &quot;nameserver 8.8.8.8&quot; &gt; \/etc\/resolv.conf<\/code><\/mark><\/p>\n\n\n\n<p>Now you should have internet access and can do <mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>opkg update<\/code><\/mark> and <mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>opkg install pciutils<\/code><\/mark>. Once that is complete do <mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>lspci<\/code><\/mark> to make sure the wireless card is being passed to the VM.<\/p>\n\n\n\n<p>When it is confirmed to be there, do wget <a href=\"https:\/\/github.com\/IIJ-NetBSD\/netbsd-src\/blob\/master\/external\/intel-fw-public\/iwl7260\/dist\/iwlwifi-7260-17.ucode\">https:\/\/github.com\/IIJ-NetBSD\/netbsd-src\/blob\/master\/external\/intel-fw-public\/iwl7260\/dist\/iwlwifi-7260-17.ucode<\/a>  (or whatever specific wifi card you have) and put that file in \/lib\/firmware and reboot.<\/p>\n\n\n\n<p>Now edit <mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>vi \/etc\/config\/network<\/code><\/mark> to look like this (adjust for your wan and lan details):<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">config interface &#039;loopback&#039;                                                                                \n        option device &#039;lo&#039;                                                                                 \n        option proto &#039;static&#039;                                                                              \n        option ipaddr &#039;127.0.0.1&#039;                                                                          \n        option netmask &#039;255.0.0.0&#039;                                                                         \n                                                                                                           \nconfig globals &#039;globals&#039;                                                                                   \n        option ula_prefix &#039;fd25:c50b:d1ea::\/48&#039;                                                            \n                                                                                                           \nconfig device &#039;brlan_dev&#039;                                                                                  \n        option name &#039;br-lan&#039;                                                                               \n        option type &#039;bridge&#039;                                                                               \n        list ports &#039;eth0&#039;                                                                                  \n                                                                                                           \nconfig interface &#039;lan&#039;                                                                                     \n        option device &#039;br-lan&#039;                                                                             \n        option proto &#039;static&#039;                                                                              \n        option ipaddr &#039;192.168.2.1&#039;                                                                        \n        option netmask &#039;255.255.254.0&#039;                                                                     \n        option ip6assign &#039;60&#039;                                                                              \n        option ip6ifaceid &#039;::1&#039;                                                                            \n        option dns &#039;192.168.3.92&#039;                                                                          \n                                                                                                           \nconfig device &#039;wan_eth0_dev&#039;                                                                               \n        option name &#039;eth0&#039;                                                                                 \n        option macaddr &#039;bc:24:11:3a:3f:5b&#039;                                                                 \n                                                                                                           \nconfig interface &#039;wan&#039;                                                                                     \n        option device &#039;br-wan&#039;                                                                             \n        option proto &#039;static&#039;                                                                              \n        option ipv6 &#039;0&#039;                                                                                    \n        option ipaddr &#039;192.168.1.97&#039;                                                                       \n        option netmask &#039;255.255.255.0&#039;                                                                     \n        option gateway &#039;192.168.1.1&#039;                                                                       \n        option dns &#039;192.168.1.1&#039;                                                                           \n                                                                                                           \nconfig device &#039;brwan_dev&#039;                                                                                  \n        option name &#039;br-wan&#039;                                                                               \n        option type &#039;bridge&#039; <\/code><\/pre>\n\n\n\n<p>And edit <mark style=\"background-color:#fcb900\" class=\"has-inline-color\"><code>vi \/etc\/config\/wireless<\/code><\/mark> to be (edit to the correct wifi you want to join):<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-\">config wifi-device &#039;radio0&#039;\n        option type &#039;mac80211&#039;\n        option path &#039;pci0000:00\/0000:00:10.0&#039;\n        option band &#039;5g&#039;\n        option channel &#039;48&#039;\n        option htmode &#039;VHT80&#039;\n        option country &#039;SN&#039;\n        option disabled &#039;0&#039;\n\nconfig wifi-iface &#039;default_radio0&#039;\n        option device &#039;radio0&#039;\n        option mode &#039;sta&#039;\n        option network &#039;wan&#039;\n        option key &#039;password&#039;\n        option ssid &#039;mywifi&#039;\n        option encryption &#039;psk2&#039;<\/code><\/pre>\n\n\n\n<p>Reboot, and in the console you should see the wifi card connect to network.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The problem:My router (WDR4300) was overloaded with 30ish concurrent clients and 240ish quotas to keep track of, and load was way too high. Option 1: Switch to a Draytek router with quota mangementOption 2: Buy a USB-&gt;Ethernet adapter and virtualize Gargoyle on Proxmox on a 4th gen intel processorOption 3: Set up VLANs on a&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-452","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/blog.ltzs.us\/index.php?rest_route=\/wp\/v2\/posts\/452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.ltzs.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.ltzs.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.ltzs.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.ltzs.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=452"}],"version-history":[{"count":2,"href":"http:\/\/blog.ltzs.us\/index.php?rest_route=\/wp\/v2\/posts\/452\/revisions"}],"predecessor-version":[{"id":454,"href":"http:\/\/blog.ltzs.us\/index.php?rest_route=\/wp\/v2\/posts\/452\/revisions\/454"}],"wp:attachment":[{"href":"http:\/\/blog.ltzs.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.ltzs.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=452"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.ltzs.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}