$ | >

Support iptables

Originally posted on Github around a year ago: https://github.com/Microsoft/WSL/issues/767

Not sure how feasible this is to implement, but I've found myself in a couple of situations where it would've come in quite useful.

369 votes
Sign in
Sign in with: Facebook Google
Signed in as (Sign out)

We’ll send you updates on this idea

Ricky shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Sign in with: Facebook Google
Signed in as (Sign out)
  • Thomas commented  ·   ·  Flag as inappropriate

    DISKPART> select disk 0

    Disk 0 is now the selected disk.

    DISKPART> list partition

    Partition ### Type Size Offset
    ------------- ---------------- ------- -------
    Partition 1 Recovery 450 MB 1024 KB
    Partition 2 System 100 MB 451 MB
    Partition 3 Reserved 16 MB 551 MB
    Partition 4 Primary..........457 GB 567 MB
    Partition 5 System..........488 MB 357 GB
    Partition 6 Ext4 /boot......977 MB 358 GB
    Partition 7 Ext4 /.............88 GB 359 GB
    Partition 8 Ext4 /home....29 GB 447 GB

    Move mount point of WSL to partion 6,7 and 8?

  • Duncan Watson commented  ·   ·  Flag as inappropriate

    I also need iptables support in WSL. I feel crippled without my normal tools, looking for more workarounds now.

  • Dave commented  ·   ·  Flag as inappropriate

    Still needed nearly 3 years after the OP, please look at this!

  • Anonymous commented  ·   ·  Flag as inappropriate

    I need this to run SQL Server 2017 in a docker container, with a volume mapping for the databases to a location on the host.

  • Mii commented  ·   ·  Flag as inappropriate

    Error starting daemon: Error initializing network controller: Error creating default "bridge" network: Failed to Setup IP tables: Unable to enable NAT rule: (iptables failed: iptables --wait -t nat -I POSTROUTING -s ! -o docker0 -j MASQUERADE: iptables: Invalid argument. Run `dmesg' for more information.
    (exit status 1))

  • Thomas Braun commented  ·   ·  Flag as inappropriate

    Support ufw and iptables, and you made networking so much easier for everyone. People will love you even more

  • Carlos Guizar commented  ·   ·  Flag as inappropriate

    Cannot run Docker because of the same reason:

    Error starting daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.6.1: can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
    Perhaps iptables or your kernel needs to be upgraded.

← Previous 1

Feedback and Knowledge Base