Direct Connect and Internet Sharing

Wrandrall

Cadet
Joined
Jan 6, 2021
Messages
4
Hello everyone.

I have a request to the comunity. I am a bit desperate as i tried to fix it myself without any success. Which is why i came down here. I thanks everyone in advance =)

I have setup a direct connection from my NAS (Truenas 12.0-U1) to my personal computer (win10) using an ethernet RJ45 cable. This same PC has 2 NIC : the motherboard ethernet connection and a a WIFI AC-68 Asus card. I have setup my PC ethernet IP to 192.168.137.1/24, my PC Wifi card IP to 192.168.1.3 and my NAS IP to 192.168.137.2/24. Which mean i am able to connect to my NAS from my PC via the web interface.

I cannot (due to constrain that aren't fixable) connect my NAS to my home network directly. Which mean i am stuck with my NAS only connected to my PC via the ethernet cable. Which mean, i can't access internet on the NAS, and therefore cannot download updates and plugins. I tried to setup an internet sharing between my PC and my NAS, without succes.

On windows, i have tried to enable internet sharing (Network Control Panel > Modify Card Setup > Right Click on Wifi Card > Sharing > Enable sharing internet to other users). I also tried to modify things on my NAS network configuration. But because i know NOTHING about network, i just broke my network configuration 2 times and decided to call it a day. (By broke i mean: no web interface working due to fail netowrk configuration.I had to unplug my graphic card from my PC, plug it to the nas, setup network again and plug graphic card on PC again. 2 times).

Does anyone knows how i could configure my Win10 and my NAS (step-by-step with precise explanation as i am really lost with all thos technical term right now) so i can share my win10 internet to my NAS and finally be able to download plugins or update the nas ?

A big thank you to everyone who read this, and those who will help, if any =)

1609948215270.png

1609948226463.png
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
[moderator note]: This isn't a FreeNAS issue so I'm moving it from Networking to Off-Topic. You are certainly welcome to continue to discuss this there.

For wired ethernet, you could bridge the interfaces.

Google terms: "bridge windows ethernet interfaces"

In general, you cannot bridge a wired and a wifi interface, however, because the way a wireless network works is somewhat different. You can set your Windows host up as a proxy, in several different ways, including using the Windows Internet Sharing feature, but also through an HTTP proxy, for which many are available for Windows. FreeNAS will allow you to configure an HTTP proxy under Network -> Global Configuration -> HTTP Proxy.
 

Wrandrall

Cadet
Joined
Jan 6, 2021
Messages
4
I am sorry for the wrong Topic selection. I honestly thought it was a Network problem and therefore should be in the Network Topic !

If i understand correctly : i have to setup an HTTP proxy (whatever that is, but i'll check this out) and then bridge it with the ethernet ?

Iam a total newbie but i promise i do my best !
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I have setup a direct connection from my NAS (Truenas 12.0-U1) to my personal computer (win10) using an ethernet RJ45 cable. This same PC has 2 NIC : the motherboard ethernet connection and a a WIFI AC-68 Asus card. I have setup my PC ethernet IP to 192.168.137.1/24, my PC Wifi card IP to 192.168.1.3 and my NAS IP to 192.168.137.2/24.
How does your desktop computer connect to the internet?

Windows has the ability to bridge interfaces, which means that your interfaces will behave more like ports on a network switch instead of the way you have them configured now. The advice @jgreco gave is good. I am sure you can find directions on the internet for this. The computer 'behind' the windows PC could be anything, it does not matter that it is a NAS. The thing this will do, potentially, is give everyone else on the network access to your NAS.
 

Wrandrall

Cadet
Joined
Jan 6, 2021
Messages
4
My desktop PC is connected to the internet VIA the WIFI card.
I actually tried to setup a bridge without any succes (unexpected error from windows ; the bridge get created but i lost all internet connexion after that. I had also a random "valid ip config error" which disapeared after some trial-error). I just did try and now, for some reason, my ethernet IP is setup to something else. I can't change it and i can't access to the web interface of my nas anymore. It is a bit of a mess

1609952584339.png


1609952615941.png
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Well, I'm not sure how to un-mess-up your PC, but I can tell you that the bridge won't work with wifi, isn't expected to, and can't really be made to (which isn't exactly true for networking wizards but is true for this discussion).

Once you get your PC working again, see if you can find a proxy server that runs on Windows that you are comfortable with, the simpler the better. You will run this on your PC, and the FreeNAS host can then talk to it and "appear" to be just another program running on your PC, from the wifi's point of view.
 

Wrandrall

Cadet
Joined
Jan 6, 2021
Messages
4
Thank mate !
I finally managed to restore mystatic IP using "netsh interface ipv4 set interface 12 dadtransmits=0 store=persistent" on powershell (changing interface 12 to interface XX with XX beeing the number alocated to my ethernet interface). Now i will try to do your solution using proxy.
If it isn't working, well, at least i learned something ! Thank you a lot for your help !
 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,919
I am wondering if it would be worthwhile to quickly discuss the "unfixable" constraints that allegedly prohibit the connection of the NAS to the home network. No offense meant, but how can you be so sure that nothing can be done here?
 

Dan Tudora

Patron
Joined
Jul 6, 2017
Messages
276
hello
KISS (Keep it simple, stupid)
JUST connect ALL in the same router/switch with cable
and not have another discution about bridge/proxy/Windows share connection and etc.
 

short_bus

Cadet
Joined
Feb 23, 2023
Messages
3
for anyone else googling this, I just ran into the same setup needs, my truenas box is loud and my kiddo loves to press the on/off button on it when it was sitting in the living room connected to my router. I moved it to my office (no ethernet ports in my walls and no wifi on the truenas box)and connected via ethernet to my PC, turned on the share wireless network with the ethernet interface and then found I couldn't connect out from truenas.

to fix this you need to access the web interface > Network > Global configuration > set the Default gateway/DNS server to the IP the Ethernet adapter your pc with wifi shared is given and you should be good to go

1677202554446.png
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
This is going to depend on what exactly you set up on the client-PC-turned-WiFi-bridge. Your setup sounds fragile as hell, depending on a static configuration of addresses leased out via DHCP to a separate machine.

The better way of dealing with this is to bridge the WiFi and Ethernet NICs.

The proper way of doing this is to get a dedicated device to do the WiFi/Ethernet bridging.

Of course, running cable is far superior to any of these options, but sometimes it's just not in the cards...
 
Joined
Jun 15, 2022
Messages
674

short_bus

Cadet
Joined
Feb 23, 2023
Messages
3
This is going to depend on what exactly you set up on the client-PC-turned-WiFi-bridge. Your setup sounds fragile as hell, depending on a static configuration of addresses leased out via DHCP to a separate machine.

The better way of dealing with this is to bridge the WiFi and Ethernet NICs.

The proper way of doing this is to get a dedicated device to do the WiFi/Ethernet bridging.

Of course, running cable is far superior to any of these options, but sometimes it's just not in the cards...
It's not super great, the nas is now only available to the PC turned bridge, as the shared connection is put on a seperate subnet, purchasing a wireless bridge adapter would be the elegant solution in this scenario
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
There is a prescribed way of a Windows box sharing a WiFi connection onto Ethernet:
That seems to be accomplishing the inverse functionality to what OP needs. Also seems mighty complicated, for something that was pretty easy in the Windows 7 days...

this is the way, however the nas needs to be told how to get out to the internet by assigning the DNS/gateway of the Bridged PC IP
Thing is, it's not bridged if it's in a different subnet, your desktop is merely acting like a NAT gateway.
What you want to do is setup a bridge. Select the two interfaces, right click and click on "Bridge" or something to that effect.
 
Joined
Jun 15, 2022
Messages
674
I have setup a direct connection from my NAS (Truenas 12.0-U1) to my personal computer (win10) using an ethernet RJ45 cable.

i can't access internet on the NAS, and therefore cannot download updates and plugins.

I have setup my PC ethernet IP to 192.168.137.1/24, my PC Wifi card

On windows, i have tried to enable internet sharing
The guide I linked has this as the first paragraph:
In many situations, you can connect all of your devices to the same Wi-Fi network so getting them online is no problem. But what happens when one of your devices doesn’t have access to the connection, either because there it doesn’t have Wi-Fi, there is no Wi-Fi or the access is restricted (as in a hotel that only allows one connection per room)? Fortunately, you can easily share your Internet connection in Windows 10 and you can do it over a direct Ethernet connection or by turning the host PC into a hotspot. The client device doesn’t even have to be running Windows.​

How is that not the same situation, exactly? That is the OP's situation. Also short_bus starts out saying, "for anyone else googling this, I just ran into the same setup needs, ..."

this is the way, however the nas needs to be told how to get out to the internet by assigning the DNS/gateway of the Bridged PC IP
Ah. Well, he hasn't been here since his initial post, but you do have a point. Re-reading your post you also have the answer.

Thing is, it's not bridged if it's in a different subnet, your desktop is merely acting like a NAT gateway.
What you want to do is setup a bridge. Select the two interfaces, right click and click on "Bridge" or something to that effect.
Is this solution awesome? YES! Because it works. Is it the TrueNAS 100% rock-solid done-right way! Hell no! (can I say that?) But it does work, and that's honestly all the lay-person is looking for. That and "Is the computer plugged in to the power outlet?" --You know the help desk always starts with that question.
 
Top