Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

4 Answers

  • 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.

share|improve this answer
add comment

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?

share|improve this answer
    
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 '09 at 14:17
add comment

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

share|improve this answer
add comment

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.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.