wireless linux host

Discussion in 'Parallels Workstation for Windows and Linux' started by fwo, Mar 23, 2006.

  1. fwo

    fwo

    Messages:
    2
    I have a wireless Linux host with a Parallels virtual machine running Windows 2000. I can't figure out how to get the virtual machine onto the Internet.

    I know that this is in the faq, but I can't get it to work with that set of instructions.

    Parallels is impressive so far, but it's of no use to me if I can't my get my virtual machine onto the Internet.

    F W Owen
    Homerville, OH
     
  2. zoom

    zoom

    Messages:
    5
    Can you describe, why the workaround provided in FAQ doesn't work for you? Did you perform all the actions? Did any of them fail?

    Anyway, I think you'd better send a message to Parallels Support via http://www.parallels.com/en/support They'll help you get this up and running :)
     
    Last edited by a moderator: Mar 24, 2006
  3. Dina

    Dina

    Messages:
    1
    Let's check all the steps from the very begginning. First of all,
    #ifconfig -a
    and check you have a vnic0 interface and an outward interface :)
    Then
    # sysctl net.ipv4.ip_forward
    should shows net.ipv4.ip_forward = 1.
    Make sure that the module ip tables are loaded to the kernel:
    # lsmod | grep ip_tables
    this should tell you that ip_tables module is loaded into the kernel. Of course, it returns nothing if NAT support compiled is as a part of the kernel, not as a module.
    The next step - to add the necessary rule to the table:
    #iptables -t nat -A POSTROUTING -s 10.0.1.0/24 --out-interface eth0 -j SNAT --to-source 192.168.81.24
    don't forget to change eth0 to your interface, 192.168.81.24 to your ip, 10.0.1.0/24 to your host-only networking settings. Check the rule was added:
    #iptables -t nat -L
    The output should be like:
    chain POSTROUTING (policy ACCEPT)
    target prot opt source destination
    SNAT all -- 10.0.1.0/24 anywhere to:192.168.81.24
    Then launch the VM and check the connection. Don't forget to change Parallels Network type to Host-Only.
    If it still doesn't work, we're waiting for the outputs :)
     
  4. fwo

    fwo

    Messages:
    2
    Got it working.

    Thank you. That's all I needed to get it working.

    The FAQ just doesn't have quite enough clues to guess the solution.
     
  5. Zero187

    Zero187

    Messages:
    2
    Alright, I tried all that but I still can't get it working. I currenlty run Linux Xandros 3 Business Edition, and I have a Linksys wireless-g card in my computer.

    When I run "iptables -t nat -L", this displays:

    Chain PREROUTING (policy ACCEPT)
    target prot opt source destination

    Chain POSTROUTING (policy ACCEPT)
    target prot opt source destination
    SNAT all -- 10.0.1.0/24 anywhere to:192.168.81.24
    SNAT all -- 10.0.1.0/24 anywhere to:192.168.81.24
    SNAT all -- 10.0.1.0/24 anywhere to:192.168.81.24
    SNAT all -- 10.0.1.0/24 anywhere to:192.168.1.1
    SNAT all -- 10.0.1.0/24 anywhere to:192.168.1.1

    I don't know how to remove the extra ones, could this be a problem? And should it be going to 192.168.1.1 (my router IP) or should it be going to the 192.168.81.24 IP?

    Also, I am unsure about the part where it says this:

    iptables -t nat -A POSTROUTING -s 10.0.1.0/24 --out-interface eth0 -j SNAT --to-source 192.168.81.24

    I am pretty sure I must use eth1, but why am I using 10.0.1.0? Shouldn't I be using 192.168.1.1/24? But my router doesn't have those IP's in it, my router starts at 192.168.1.103, so this is what I put:

    iptables -t nat -A POSTROUTING -s 192.168.1.103/110 --out-interface eth1 -j SNAT --to-source 192.168.1.1

    but when I put that it says:

    iptables v1.2.11: invalid mask `110' specified
    Try `iptables -h' or 'iptables --help' for more information.


    Another question I have is what I should be putting for the Scope start and end addresses. Should I be putting 192.168.1.103 to 192.168.1.110 or 10.0.1.1 to 10.0.1.24?

    I am very confused and I would be greatful if someone could help me with this.

    Thank you!

    EDIT:

    Also, if this information is needed, when I run "ifconfig -a" this shows up:


    eth0 Link encap:Ethernet HWaddr 00:07:E9:0E:A1:16
    BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
    Base address:0xd800 Memory:ff9c0000-ff9e0000

    eth1 Link encap:Ethernet HWaddr 00:14:BF:74:6C:A9
    inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:78614 errors:0 dropped:0 overruns:0 frame:0
    TX packets:134615 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:5341468 (5.0 MiB) TX bytes:155672414 (148.4 MiB)
    Memory:ff9fa000-ff9fbfff

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:1454 errors:0 dropped:0 overruns:0 frame:0
    TX packets:1454 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:556103 (543.0 KiB) TX bytes:556103 (543.0 KiB)

    vnic0 Link encap:Ethernet HWaddr 00:01:23:45:BE:EF
    inet addr:10.0.1.2 Bcast:10.255.255.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:108 errors:0 dropped:0 overruns:0 frame:0
    TX packets:108 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:12128 (11.8 KiB) TX bytes:12128 (11.8 KiB)
     
  6. Nadine McSim

    Nadine McSim

    Messages:
    17
    In this case the string should be
    iptables -t nat -A POSTROUTING -s 10.0.1.0/24 --out-interface eth1 -j SNAT --to-source 192.168.1.102
    This should redirect tha packets from VMs to your outward interface eth1 with IP 192.168.1.102.
    And the extra string from the table definately should be removed because the first rule which is matched is used. To remove the unnecesary rules use command
    iptables -t nat -D POSTROUTING 1
    where 1 is a rule number (starting at 1 for the first rule).
     
  7. Zero187

    Zero187

    Messages:
    2
    Ok, I think we are making progress, but I still don't have a connection.

    Now when I do Host-Only, I get an error as soon as I power the Guest-OS on saying: "Unable to open network driver!"

    Here is some info as to what I have done and the settings I have:

    ----------------------------
    When I run "iptables -t nat -L", this comes up:

    Chain PREROUTING (policy ACCEPT)
    target prot opt source destination

    Chain POSTROUTING (policy ACCEPT)
    target prot opt source destination
    SNAT all -- 10.0.1.0/24 anywhere to:192.168.1.102

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    ----------------------------

    When I run "ifconfig -a", now this comes up:

    eth0 Link encap:Ethernet HWaddr 00:07:E9:0E:A1:16
    BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
    Base address:0xd800 Memory:ff9c0000-ff9e0000

    eth1 Link encap:Ethernet HWaddr 00:14:BF:74:6C:A9
    inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:3880516 errors:0 dropped:0 overruns:0 frame:0
    TX packets:3369786 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:443143719 (422.6 MiB) TX bytes:1636073023 (1.5 GiB)
    Memory:ff9fa000-ff9fbfff

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:666 errors:0 dropped:0 overruns:0 frame:0
    TX packets:666 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:86972 (84.9 KiB) TX bytes:86972 (84.9 KiB)

    vnic0 Link encap:Ethernet HWaddr 00:01:23:45:BE:EF
    BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

    ----------------------------

    I have also used these IP settings in the Guest-OS:

    IP 10.0.1.1
    Subnet: 255.255.255.0
    Default Gateway: 192.168.1.102

    and I used my current DNS as well.


    Is there any way that maybe I'm doing something wrong, or a possible way to get this working?

    Thanks a lot, I really am greatful for this forum's support and help.
     
  8. Nadine McSim

    Nadine McSim

    Messages:
    17
    Please change the IP for Guest OS to the 10.0.1.3 or higher because the 10.0.1.1 is used for Parallel's DHCP server. Now, when this IP is busy, DHCP server can't work and your vnic0 interface is left without an IP - and it's oit of the game :).
    After changing the IP shut down the Guest OS, restart Parallels Drivers with
    cd /usr/lib/parallels/autostart/
    ./drivers_stop
    ./drivers_start
    and check that your vnic0 has an IP. Then power on the VM and check the connection inside it.
     

Share This Page