0

I have a linksys router that is letting traffic through just fine, but when I try to let that same traffic through to my linux box (fedora 10) it stalls. I've followed every iptable rule I can find to no avail. If I chkconfig iptables off -> reboot. Voila. But obviously I don't want to leave things like that.

Any ideas? Any "tools" to see exactly what ports are or are not open?

4 Answers 4

1
  • nmap: scan for open ports.
  • netcat: like telnet, but on steroids. the swiss army knife of connection debugging. great for manually connecting to ports and shoving data in.
  • Wireshark: packet sniffer. can grab everything off the network if your card supports promiscuous mode (I think every ethernet card does.) great for double-checking that your traffic in and out looks how you'd expect.

I would also recommend rechecking your IPtables rules. OUTPUT can be a bit challenging.

0

nmap can check open ports. Can we have some more information? What iptables rules are you using? A little more information. What ports are you trying to block?

1
  • well, I want to block ALL ports, then allow only the few I need apps to get data through. For instance, the basics, 80, 21, 25, 3306.. I want those open, and say something new like 2106? How do I (syntax please) open those ports for incoming traffic to an application running on the box?
    – Gene R
    Oct 2, 2009 at 14:17
0

If you're looking for an easier way of writing iptables rules, you can check out Firehol which makes this very easy.

0

I won't give you a syntax for making iptables rules, since there are lots of tutorials out in the web describing this much better than I can. If you want to debug your existing rules, then

  • post the output of your iptables -vL and, so that we know what rules you are using currently, and
  • have a look at the output of iptables -vL yourself: The first column tells you how many packets matched the given rule. If it shows zero, it means that the packets have probably been matched by an earlier rule.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .