LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Closed Thread
  Search this Thread
Old 10-16-2011, 07:40 AM   #1
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Rep: Reputation: 68
Iptables is blocking bluetooth/hci0 connection


Hi all,

I have an HP Deskjet 460btw portable printer - which can connect over usb and bluetooth. I've just setup the printer in Slackware using bluetooth after an upgrade - and it only works if I stop my iptables firewall. Otherwise, if the firewall is up, the printer will output a line of garbled text - and nothing else. All works fine if the firewall is stopped. There is no reference/setting in my rc.firewall to /dev/hci0 yet.

I used this printer before, but because of circumstances, there was no firewall involved in the past. So I don't think it is a new problem specific to Slackware 13.37.

My questions are:

1. Is iptables interfering with the hci0 (or other interface)? Even for non network protocols, such as printing over bluetooth? I can't find any references in Google about this - unless I'm searching for the wrong thing.

2. If the answer to the above question is "yes" - what is the best way to proceed? Do I just add rules in rc.firewall to allow all inbound and outbound traffic on hci0? I take it I can't be more selective (limit to certain ports) - as I don't imagine bluetooth is using tcp or udp for printing - or am I wrong?

3. Will iptables interfere just the same if I connect a bluetooth headset for example?

4. After bluez/bluetoothd starts and the printer is connected, there is no /dev/hci0 like it used to be in older versions of Slackware. I can only find an hci0 under the /sys folder. What is the reason for that? No corresponding udev rule?

Please note that I am not using any form of networking over Bluetooth - as far as I know.

Thanks in advance for any answers.

Sebastian
 
Old 10-17-2011, 07:11 AM   #2
CTM
Member
 
Registered: Apr 2004
Distribution: Slackware
Posts: 308

Rep: Reputation: 287Reputation: 287Reputation: 287
I don't have a definitive answer for questions 1-3, but assuming your default policy is to drop packets, appending this to rc.firewall will log all dropped packets to a new chain named LOGGING (the log message will be sent to syslog):

Code:
/usr/sbin/iptables -N LOGGING
/usr/sbin/iptables -A INPUT -j LOGGING
/usr/sbin/iptables -A FORWARD -j LOGGING
/usr/sbin/iptables -A LOGGING -m limit -j LOG --log-prefix "packet dropped: " --log-level 7
/usr/sbin/iptables -A LOGGING -j DROP
The verbosity level is high enough that you should be able to tell which interface is affected, and the source/destination IPs should tell you whether that traffic was destined for your printer (and therefore whether it's being intercepted).
 
Old 10-27-2011, 04:46 AM   #3
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
I'm afraid I have to mark this thread as solved - without providing a definite answer. The printer just started working over bluetooth, with the firewall on - for no reason whatsoever. I have not amended the firewall in anyway (it is a manually generated rc.firewall, using the Slackware firewall generator here: http://connie.slackware.com/~alien/efg/). As far as I know, I haven't changed anything else to do with cups, bluetooth or firewall.

That night when I posted the OP, it would definitely work with the firewall down, and not work with the firewall up. I tried it several times both ways just to make sure. Now it is working all the time. I've scratched my head but can't come up even with a wild guess as to the cause of this. At least it is working now.

Thanks for the reply anyway.
 
Old 10-27-2011, 05:01 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables port 25 connection limit without blocking Barracudas/Smart_Phones rhbegin Linux - Security 4 01-17-2011 01:54 AM
USB Bluetooth hci0 and /dev/rfcomm Questions... seattleweb Linux - Newbie 0 08-23-2007 12:26 AM
hci0 ikkuh1991 Linux - Hardware 1 09-11-2005 02:07 PM
Cant get hci0 loaded (bluetooth) hyllplan Linux - Hardware 0 06-02-2005 04:21 AM
iptables blocking samba connection to WinXP QClown Linux - Networking 15 01-30-2005 04:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration