1

The setup is currently 1 Windows 10 Home laptop with wifi internet access from a router that I don't have admin access to (Thus no custom DHCP config). The Windows machine is connected to a switch which is connected to a Ubuntu Hadoop Cluster with permanent static IP's that I cannot change. My goal is to bridge internet to the Ubuntu cluster so I can do some apt-gets. The current issue is trying to route it. The Internet is coming from 192.168.43.114 on subnet 255.255.255.255 while the Hadoop cluster is on 192.168.2.x on subnet 255.255.255.0. I've tried route add DESTINATION MASK SUBNET GATEWAY but to no avail. Is Windows capable of doing this or do I have this conceptually wrong?

The Windows can connect to both networks simultaneously via ICSharing by editing regedit of HKLM\System\CurrentControlSet\services\SharedAccess\Parameters and editing it to be 19.168.2.200. There appears to be no Internet access on the cluster though.

    IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0    192.168.2.255    192.168.2.244    281
          0.0.0.0          0.0.0.0     192.168.43.1   192.168.43.114     55
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
      192.168.2.0    255.255.255.0         On-link     192.168.2.244    281
    192.168.2.244  255.255.255.255         On-link     192.168.2.244    281
    192.168.2.244  255.255.255.255         On-link    192.168.43.114     56
    192.168.2.255  255.255.255.255         On-link     192.168.2.244    281
     192.168.43.0    255.255.255.0         On-link    192.168.43.114    311
   192.168.43.114  255.255.255.255         On-link    192.168.43.114    311
   192.168.43.255  255.255.255.255         On-link    192.168.43.114    311
     192.168.56.0    255.255.255.0         On-link      192.168.56.1    281
     192.168.56.1  255.255.255.255         On-link      192.168.56.1    281
   192.168.56.255  255.255.255.255         On-link      192.168.56.1    281
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link      192.168.56.1    281
        224.0.0.0        240.0.0.0         On-link     192.168.2.244    281
        224.0.0.0        240.0.0.0         On-link    192.168.43.114    311
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link      192.168.56.1    281
  255.255.255.255  255.255.255.255         On-link     192.168.2.244    281
  255.255.255.255  255.255.255.255         On-link    192.168.43.114    311
===========================================================================
5
  • It seems that you needn't to play with routing. Try to share your 192.168.43.114 adapter internet connection to 192.168.2.0 network using Wi-Fi connection properties -> Sharing tab and option "Allow other network users to connect through this computer's Internet connection". In "Home networking connection" select the name of the network your claster is connected to. Commented May 1, 2017 at 20:36
  • I currently have that enabled and the Windows machine can connect to both the Internet and the machines in the cluster. Although the cluster doesn't seem to receive any internet. There must be some Linux setting that I'm not finding or something.
    – Apples446
    Commented May 1, 2017 at 21:00
  • OK. Did you specified in network parameters of your Ubuntu machine that 192.168.2.200 computer is default gateway and DNS server? Commented May 1, 2017 at 21:27
  • By the way, the first row of your routing table looks strange because there shouldn't be two default gateways on one machine. Also broadcast IP address can not be used as a gateway. Commented May 1, 2017 at 21:33
  • Another simple way to get connected to Internet from Ubuntu is to set SOCKS proxy from Win machine to any Linux server outside using D option in "SSH tunnels" tab of Putty SSH client. Say, you've established SOCKS proxy connection to 5000-th source port of your Windows machine, then open this port in firewall for external connections and set proxy as Win_IP:5000 in your Ubuntu machine (Win_IP is IP of your Win10 machine in 192.168.2.0 subnet). Also check "Local ports accept connections from other hosts" option in "Port forwarding" settings of the above tab in Putty before creating this tunnel. Commented May 2, 2017 at 5:25

1 Answer 1

0

To bridge internet from a Windows machine to an Ubuntu cluster that are on different subnets, I had to do the following:

  1. Find the subnet of the Ubuntu cluster
  2. Assign an unused address of that cluster subnet to the Windows bridge by editing the following two regex (On Windows 10):

    • HKEY_LOCAL_MACHINE > SYSTEM >CurrentControlSet > Services > SharedAccess > Parameters > ScopeAddress & ScopeAddressBackup
  3. Open Network and Sharing Center > Change adapter settings > Right-click the adapter receiving internet > properties > Sharing tab > Check Allow other network users to connect through this computer's internet connection > choose the adapter to the cluster > click ok

  4. On the Ubuntu machines, do the following:

    • disable the main adapter via sudo ifdown eno1 (ifconfig to find it)
    • Set up the static IP's with the gateway of the assigned IP of the bridge. ( /etc/network/interfaces example below):

      # This file describes the network interfaces available on your system 
      # and how to activate them. For more information, see interfaces(5).
      # The loopback network interface 
      auto lo
      iface lo inet loopback
      
      # The primary network interface
      auto em1
      iface em1 inet static
          address 192.168.2.5
          netmask 255.255.255.0
          gateway 192.168.2.200
          dns-nameserver 192.168.2.200
      
    • Edit the /etc/resolv.conf to match the dns-nameserver

    • Turn the adapter back on via sudo ifup eno1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .