Public wifi to Private (home) LAN

proteasome

Honorable
Dec 14, 2013
4
0
10,510
I've been scratching my head over this for days. I know a bit about computers (mostly Linux), but not too much about networking or Windows. Here's my situation:

I have access privileges to a wifi network from the building next door which I use for internet on my gaming PC (running Windows 7) through a USB wireless adapter. What I don't have (but need) is my own wired and wireless LAN for my apartment. (There are too many raspberry pi projects I can't do because I don't have my own network :)

I have a Linksys WRT-54GL that I would like to use for it. I even installed Tomato router firmware on it a few years ago to use it as a wireless bridge.

I want my connection to be: external wifi -> my PC -> router (via ethernet) -> private LAN wireless and wired clients with internet access. Basically, using my PC as a you would a cable modem for the router.

Is this possible? I've tried turning on ICS for my PC's ethernet adapter, setting up a static IP on the PC, and pointing the router in AP mode to that IP as the gateway. I've tried different static IPs because many are already in use on the incoming wifi network (for instance, 192.168.1.1 isn't available).

No matter what I've tried, or what forums I've read I can't get this to work. Do I need to modify the subnet mask? Do I need to use a crossover cable? Should I stick with DHCP? Does my PC need to be assigning IPs instead of the router in this setup?

Any help you could offer would be REALLY appreciated. I haven't found anyone asking this specific question anywhere else and am at a dead end without some expert guidance.
 
Solution
You should not be using your WAN port on the router -- you do not have a WAN for the router, just use LAN ports. The desktop Ethernet cannot be your WAN, it is simply a client (that has bridged adapters).

The subnet mask should be 255.255.255.0 on your LAN, which is the standard class C network.

The wireless adapter needs an address on the external wireless network, the Ethernet adapter cannot be on the same network -- the Ethernet must be on the same network as your router and all internal LAN devices. If you wished, you could have all your internal wired devices on static addresses on the internal network (192.168.254.x, where 1 is the gateway and every other device has a different value all the way up to 254). I would leave DHCP...

RealBeast

Titan
Moderator
I would first turn off ICS (it is incompatible with the next step).

Connect your Ethernet port to the router LAN port and set up your router using a different IP range than the wireless network (so let's say 192.168.254.1 for your router gateway and then set up its wireless with different radio channel than the incoming wireless, and set a security passkey.

To determine the best non-overlapping radio channel (1, 6, or 11) to use, download the free wireless analyzer inSSIDer from HERE, and look under the network tab for networks by channel and strength.

Then in the PC with the wifi go into the network control panel, change adapter settings, highlight both the wireless and Ethernet adapters, right click and select bridge connections.

I would make the wireless connection a public rather than home, if you haven't already.

And a last, but important detail about your internal LAN: You should manually assign static ip address and subnet values for the wired connection of your PC to your wired LAN. Make sure that the ip addresses you assign are on the same network/subnet as your router. Leave the default gateway blank for your PC Ethernet, you don't need it since you're not leaving the local area network with this connection. Also leave the DNS server values blank, since you are not going to be resolving Internet connections on the LAN, that all will happen on the router that the wireless is attached to. Your router can use DHCP for all of your other devices that connect, just not the PC where the bridge is made.
 

proteasome

Honorable
Dec 14, 2013
4
0
10,510
Thanks for the tips RB!

Things are better, but I still have a few problems. I found the best channel and set the router LAN to the IP you suggested (192.168.254.1) and it's able to assign private IPs (254.x) to my laptop, phone, etc. I am even able to get internet through my private wireless when I set the network bridge and the router WAN to DHCP, but it's spotty and doesn't always work, and when I do this I can't get internet on the desktop PC.

I tried using the static IP, but must be setting something up wrong. Could you clarify a few things?

- Should the ethernet cable go into the WAN port, or one of the LANs on the router?
- When I made the network bridge, I lost the ability to set the static IP on the ethernet adapter. I'm assuming I set it on the bridge? If I set a static IP on the bridge, doesn't it need to be within the address range of of the external router? Windows says I can use an alternate configuration if it's operating on more than one network, so I'm not sure if I should leave the bridge on DHCP, and then enter an alternate static within the router's ip range.
- Do I need to change the subnet mask so that it's different between the private router and the desktop ethernet/bridge?
- Finally, under the router's WAN settings, when using a static IP do I enter the desktop ethernet/bridge IP under the 'IP' address field and leave gateway blank?

Thanks so much for the help.
 

RealBeast

Titan
Moderator
You should not be using your WAN port on the router -- you do not have a WAN for the router, just use LAN ports. The desktop Ethernet cannot be your WAN, it is simply a client (that has bridged adapters).

The subnet mask should be 255.255.255.0 on your LAN, which is the standard class C network.

The wireless adapter needs an address on the external wireless network, the Ethernet adapter cannot be on the same network -- the Ethernet must be on the same network as your router and all internal LAN devices. If you wished, you could have all your internal wired devices on static addresses on the internal network (192.168.254.x, where 1 is the gateway and every other device has a different value all the way up to 254). I would leave DHCP on though for the wireless connections.

A couple important notes on static addresses. If you set a static address on a device, you must also enter that static address in the router static table along with the device MAC address. All static addresses should be outside the DHCP range so for example make the available addresses for static use 192.168.254.2 to .64 and then set the DHCP range in the router from 192.168.254.65 to .254. No overlap.

All a bridge does is connect two different networks together through the computer that has multiple adapters.
 
Solution

proteasome

Honorable
Dec 14, 2013
4
0
10,510
I understand what you're saying. Keep the wireless adapter on the external subnet, change the ethernet adapter to a static ip on the private router subnet.

However, when I create the network bridge in Windows 7, I can no longer change the IPs for NIC and WNIC. ipconfig /all no longer shows these devices, only the bridge.