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'm trying to setup some iptables rules on my embedded Debian Linux system, using a serial console I entered this:

root@ts7600-47aad3:~# iptables -F
root@ts7600-47aad3:~# iptables -P INPUT DROP

but it seems to have dropped my serial port connection, I can't type any more commands. I was not expecting this, I thought iptables only affected IP interfaces?

share|improve this question
    
Is that a physical serial console? That should indeed not be affected. Though you can do IP over a serial line, of course... –  Hauke Laging Feb 27 at 18:01
    
This is a pyhsical serial console, yes I was not expecting it to be blocked when I did my INPUT DROP! –  fred basset Feb 27 at 18:21

1 Answer 1

up vote 3 down vote accepted

iptables does not effect data sent over the serial port (unless you're running PPP or similar over the port, of course).

But that command you gave is pretty broad, for example, you dropped packets that are entirely internal to the machine (go over lo). Depending on how your serial port is set up, maybe that was required. Dropping traffic over lo tends to break a lot of stuff; some other program running on the machine could have reacted poorly to it (and, for example, took the machine down via thrashing).

Finally, not sure if you had the console visible somewhere (including sent over the serial port), maybe there was a kernel panic?

share|improve this answer
    
Thanks for the comments. I was connected directly via a serial console, but do have PPP enabled and did have a PPP session established on ppp0. I think next time I'll specify the commands for the ppp0 interface only (as that's the one I want to protect). –  fred basset Feb 27 at 20:14

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.