Isolate VMnets with iptables

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I would like to ask about iptables:



I have my the following config



- host= Ubuntu 18.04 
- VM1= Ubuntu18.04
- VM2= Win10


My ifconfig as follows:



docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
vmnet2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
vmnet3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
vmnet5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
vmnet6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
vmnet7: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
vmnet8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
vmnet11: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
vmnet12: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500


I would like to drop all input output on my host and allow only, 80,443, icmp outbound, aptitude updates (i think it is port 53).
I want the vmnet12 and vmnet 11 not to be able to talk to each other also to have full access to the internet etc with whichever is my current active NIC.
I also want to stop any forwarding



How can I get this working?










share|improve this question



























    up vote
    0
    down vote

    favorite












    I would like to ask about iptables:



    I have my the following config



    - host= Ubuntu 18.04 
    - VM1= Ubuntu18.04
    - VM2= Win10


    My ifconfig as follows:



    docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
    vmnet2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    vmnet3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    vmnet5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    vmnet6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    vmnet7: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    vmnet8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    vmnet11: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    vmnet12: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500


    I would like to drop all input output on my host and allow only, 80,443, icmp outbound, aptitude updates (i think it is port 53).
    I want the vmnet12 and vmnet 11 not to be able to talk to each other also to have full access to the internet etc with whichever is my current active NIC.
    I also want to stop any forwarding



    How can I get this working?










    share|improve this question

























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I would like to ask about iptables:



      I have my the following config



      - host= Ubuntu 18.04 
      - VM1= Ubuntu18.04
      - VM2= Win10


      My ifconfig as follows:



      docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
      lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
      vmnet2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet7: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet11: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet12: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500


      I would like to drop all input output on my host and allow only, 80,443, icmp outbound, aptitude updates (i think it is port 53).
      I want the vmnet12 and vmnet 11 not to be able to talk to each other also to have full access to the internet etc with whichever is my current active NIC.
      I also want to stop any forwarding



      How can I get this working?










      share|improve this question















      I would like to ask about iptables:



      I have my the following config



      - host= Ubuntu 18.04 
      - VM1= Ubuntu18.04
      - VM2= Win10


      My ifconfig as follows:



      docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
      lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
      vmnet2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet7: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet11: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      vmnet12: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
      wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500


      I would like to drop all input output on my host and allow only, 80,443, icmp outbound, aptitude updates (i think it is port 53).
      I want the vmnet12 and vmnet 11 not to be able to talk to each other also to have full access to the internet etc with whichever is my current active NIC.
      I also want to stop any forwarding



      How can I get this working?







      ubuntu iptables firewall iptables-persistent






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 27 at 12:59









      Goro

      6,62752865




      6,62752865










      asked Sep 27 at 12:53









      stilia.johny

      11




      11

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f471818%2fisolate-vmnets-with-iptables%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f471818%2fisolate-vmnets-with-iptables%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)