Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I would like to host some services on my pc and make them available from internet. (I'm aware of the security implications, it's more like a test for now). I don't have experience with iptables but I would like to use it and learn at the same time. Now I'm having NAT enabled on my router. Can the router and iptables cause conflicts? I mean both can manage port forwarding, so if I want to open some ports, should I enable NAT on my router and open them through iptables or disable nat on my router and manage everything from iptables? What's the best practise?

share|improve this question

closed as too broad by Zelda, Anthon, slm, Karlson, rahmu Jan 15 at 16:38

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

    
For starters: are you talking about both iptables and NAT on the router or iptables on your PC? –  peterph Jan 15 at 16:39
    
@peterph i'm talking about NAT on a home router and iptables on my pc. –  Fabio Jan 19 at 15:43
    
Well, maybe think a bit more about what exactly to ask. The questions you should imho answer first is: "Can incoming traffic get to your PC if you don't forward the ports on the router?" and "How could firewall on your PC interfere with firewall on the router (because it is most likely just running Linux with iptables anyway)?" Then you'll probably see how to modify your question here (if that is necessary). Generally it's better to try something first and if it doesn't work as expected (or works but it's not clear why) ask for help (or explanation) here. It's much easier to answer then. –  peterph Jan 19 at 18:01