Results 1 to 10 of 10

Thread: [cod2] Running your own libcod server using WSL2 on windows

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Public network connectivity.

    Option 1: Just forward the ports from your host to your vm using https://gist.github.com/xmeng1/aae4b...1ee764928f5486

    Option 2: Bridge mode.

    Code:
    Open Hyper-V Manager as administrator
    
    Select your pc, open Virtual Switch Manager
    
    Select WSL
    
    Set to external network
    
    Select the network card the traffic runs through
    
    sudo ip addr flush dev eth0
    sudo dhclient eth0
    
    Now, you gotto get nameservers working:
    
    rm /etc/resolv.conf
    echo "nameserver 8.8.8.8" >> /etc/resolv.conf
    And disable the automatic generation of it: 
    Create a file: /etc/wsl.conf
    Put this in it: 
    
    [network]
    generateResolvConf = false
    
    Now, kill the vm with wsl --shutdown from your host machine, and restart it by running wsl
    The part with
    Code:
    sudo ip addr flush dev eth0
    sudo dhclient eth0
    Might need to be re-run every boot.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  2. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (27th April 2021)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •