How can I use DNAT on mangle table?

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











up vote
2
down vote

favorite












Can I use DNAT on mangle table?



If yes, then how?



If no, then are there any alternative to DNAT on mangle table or any outher table (but not NAT)?



Because I don't have a NAT table in my iptables (I have mangle raw ... etc but do not have NAT).







share|improve this question


























    up vote
    2
    down vote

    favorite












    Can I use DNAT on mangle table?



    If yes, then how?



    If no, then are there any alternative to DNAT on mangle table or any outher table (but not NAT)?



    Because I don't have a NAT table in my iptables (I have mangle raw ... etc but do not have NAT).







    share|improve this question
























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      Can I use DNAT on mangle table?



      If yes, then how?



      If no, then are there any alternative to DNAT on mangle table or any outher table (but not NAT)?



      Because I don't have a NAT table in my iptables (I have mangle raw ... etc but do not have NAT).







      share|improve this question














      Can I use DNAT on mangle table?



      If yes, then how?



      If no, then are there any alternative to DNAT on mangle table or any outher table (but not NAT)?



      Because I don't have a NAT table in my iptables (I have mangle raw ... etc but do not have NAT).









      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 4 at 7:32









      Vlastimil

      6,4111146119




      6,4111146119










      asked Jan 4 at 7:11









      Raju Haldar RH3X4R

      112




      112




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          2
          down vote













          You can't use DNAT in the mangle table (nor any other kind of NAT).



          Both DNAT and SNAT (and special cases of this, like MASQUERADE and REDIRECT) only work in the nat table, or more specifically:



          • DNAT only works in the nat table of the PREROUTING and OUTPUT chain.


          • SNAT only works in the nat table of the POSTROUTING and INPUT chain.


          If this is an XY-Problem, please explain why you think you need to use DNAT in the mangle table.






          share|improve this answer




















          • Because I don't have a NAT table in my iptables , i want to forward traffic to a proxy(transparent proxy)
            – Raju Haldar RH3X4R
            Jan 4 at 13:12

















          up vote
          0
          down vote













          If you don't see nat table, that means you need to load iptable_nat module on your kernel.




          modprobe iptable_nat




          If this command give you error, It means your kernel didn't compiled with that module.






          share|improve this answer




















          • my kernel didn't compiled with that module so now what i need to do
            – Raju Haldar RH3X4R
            Jan 10 at 11:08










          • @RajuHaldarRH3X4R You need to compile the kernel by enabling nat module on your kernel config. Which linux distro and kernel are you using? This module should be already enabled by default on most current distros
            – ibrahim
            Jan 10 at 12:30










          • genymotion android emulator
            – Raju Haldar RH3X4R
            Jan 12 at 6:12










          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%2f414713%2fhow-can-i-use-dnat-on-mangle-table%23new-answer', 'question_page');

          );

          Post as a guest






























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote













          You can't use DNAT in the mangle table (nor any other kind of NAT).



          Both DNAT and SNAT (and special cases of this, like MASQUERADE and REDIRECT) only work in the nat table, or more specifically:



          • DNAT only works in the nat table of the PREROUTING and OUTPUT chain.


          • SNAT only works in the nat table of the POSTROUTING and INPUT chain.


          If this is an XY-Problem, please explain why you think you need to use DNAT in the mangle table.






          share|improve this answer




















          • Because I don't have a NAT table in my iptables , i want to forward traffic to a proxy(transparent proxy)
            – Raju Haldar RH3X4R
            Jan 4 at 13:12














          up vote
          2
          down vote













          You can't use DNAT in the mangle table (nor any other kind of NAT).



          Both DNAT and SNAT (and special cases of this, like MASQUERADE and REDIRECT) only work in the nat table, or more specifically:



          • DNAT only works in the nat table of the PREROUTING and OUTPUT chain.


          • SNAT only works in the nat table of the POSTROUTING and INPUT chain.


          If this is an XY-Problem, please explain why you think you need to use DNAT in the mangle table.






          share|improve this answer




















          • Because I don't have a NAT table in my iptables , i want to forward traffic to a proxy(transparent proxy)
            – Raju Haldar RH3X4R
            Jan 4 at 13:12












          up vote
          2
          down vote










          up vote
          2
          down vote









          You can't use DNAT in the mangle table (nor any other kind of NAT).



          Both DNAT and SNAT (and special cases of this, like MASQUERADE and REDIRECT) only work in the nat table, or more specifically:



          • DNAT only works in the nat table of the PREROUTING and OUTPUT chain.


          • SNAT only works in the nat table of the POSTROUTING and INPUT chain.


          If this is an XY-Problem, please explain why you think you need to use DNAT in the mangle table.






          share|improve this answer












          You can't use DNAT in the mangle table (nor any other kind of NAT).



          Both DNAT and SNAT (and special cases of this, like MASQUERADE and REDIRECT) only work in the nat table, or more specifically:



          • DNAT only works in the nat table of the PREROUTING and OUTPUT chain.


          • SNAT only works in the nat table of the POSTROUTING and INPUT chain.


          If this is an XY-Problem, please explain why you think you need to use DNAT in the mangle table.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 4 at 8:30









          dirkt

          14.1k2931




          14.1k2931











          • Because I don't have a NAT table in my iptables , i want to forward traffic to a proxy(transparent proxy)
            – Raju Haldar RH3X4R
            Jan 4 at 13:12
















          • Because I don't have a NAT table in my iptables , i want to forward traffic to a proxy(transparent proxy)
            – Raju Haldar RH3X4R
            Jan 4 at 13:12















          Because I don't have a NAT table in my iptables , i want to forward traffic to a proxy(transparent proxy)
          – Raju Haldar RH3X4R
          Jan 4 at 13:12




          Because I don't have a NAT table in my iptables , i want to forward traffic to a proxy(transparent proxy)
          – Raju Haldar RH3X4R
          Jan 4 at 13:12












          up vote
          0
          down vote













          If you don't see nat table, that means you need to load iptable_nat module on your kernel.




          modprobe iptable_nat




          If this command give you error, It means your kernel didn't compiled with that module.






          share|improve this answer




















          • my kernel didn't compiled with that module so now what i need to do
            – Raju Haldar RH3X4R
            Jan 10 at 11:08










          • @RajuHaldarRH3X4R You need to compile the kernel by enabling nat module on your kernel config. Which linux distro and kernel are you using? This module should be already enabled by default on most current distros
            – ibrahim
            Jan 10 at 12:30










          • genymotion android emulator
            – Raju Haldar RH3X4R
            Jan 12 at 6:12














          up vote
          0
          down vote













          If you don't see nat table, that means you need to load iptable_nat module on your kernel.




          modprobe iptable_nat




          If this command give you error, It means your kernel didn't compiled with that module.






          share|improve this answer




















          • my kernel didn't compiled with that module so now what i need to do
            – Raju Haldar RH3X4R
            Jan 10 at 11:08










          • @RajuHaldarRH3X4R You need to compile the kernel by enabling nat module on your kernel config. Which linux distro and kernel are you using? This module should be already enabled by default on most current distros
            – ibrahim
            Jan 10 at 12:30










          • genymotion android emulator
            – Raju Haldar RH3X4R
            Jan 12 at 6:12












          up vote
          0
          down vote










          up vote
          0
          down vote









          If you don't see nat table, that means you need to load iptable_nat module on your kernel.




          modprobe iptable_nat




          If this command give you error, It means your kernel didn't compiled with that module.






          share|improve this answer












          If you don't see nat table, that means you need to load iptable_nat module on your kernel.




          modprobe iptable_nat




          If this command give you error, It means your kernel didn't compiled with that module.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 5 at 12:06









          ibrahim

          308111




          308111











          • my kernel didn't compiled with that module so now what i need to do
            – Raju Haldar RH3X4R
            Jan 10 at 11:08










          • @RajuHaldarRH3X4R You need to compile the kernel by enabling nat module on your kernel config. Which linux distro and kernel are you using? This module should be already enabled by default on most current distros
            – ibrahim
            Jan 10 at 12:30










          • genymotion android emulator
            – Raju Haldar RH3X4R
            Jan 12 at 6:12
















          • my kernel didn't compiled with that module so now what i need to do
            – Raju Haldar RH3X4R
            Jan 10 at 11:08










          • @RajuHaldarRH3X4R You need to compile the kernel by enabling nat module on your kernel config. Which linux distro and kernel are you using? This module should be already enabled by default on most current distros
            – ibrahim
            Jan 10 at 12:30










          • genymotion android emulator
            – Raju Haldar RH3X4R
            Jan 12 at 6:12















          my kernel didn't compiled with that module so now what i need to do
          – Raju Haldar RH3X4R
          Jan 10 at 11:08




          my kernel didn't compiled with that module so now what i need to do
          – Raju Haldar RH3X4R
          Jan 10 at 11:08












          @RajuHaldarRH3X4R You need to compile the kernel by enabling nat module on your kernel config. Which linux distro and kernel are you using? This module should be already enabled by default on most current distros
          – ibrahim
          Jan 10 at 12:30




          @RajuHaldarRH3X4R You need to compile the kernel by enabling nat module on your kernel config. Which linux distro and kernel are you using? This module should be already enabled by default on most current distros
          – ibrahim
          Jan 10 at 12:30












          genymotion android emulator
          – Raju Haldar RH3X4R
          Jan 12 at 6:12




          genymotion android emulator
          – Raju Haldar RH3X4R
          Jan 12 at 6:12












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f414713%2fhow-can-i-use-dnat-on-mangle-table%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?