maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Questions on IPTables & N900 (https://talk.maemo.org/showthread.php?t=47665)

Bricker 2010-03-18 10:38

Questions on IPTables & N900
 
Hi,
Can anyone tell me how to install iptables firewall on N900?

As far as I am aware, the default kernel is not compatible with iptables, or is it?
If it's not, how do I install both the compatible kernel and the iptables itself?

I've found some posts which are related to my question but since I am new to Linux I still couldn't understand how to install them :confused:

Also, if the default kernel of N900 is not compatible with iptables and if I do a firmware upgrade on my N900, will the compatible kernel got replaced so that I will have to reinstall it again?

Thank you in advance. ;)

P.S.: If there's something wrong with what I said, please correct me since I'm not sure if I understood those things properly. All I want is a firewall :D

Bricker 2010-03-19 00:14

Re: Questions on IPTables & N900
 
any answer please? :confused:

by the way, I've just found iptables package here:
http://maemo.org/packages/view/iptables/

Can I just use it?
Which one should I download?
And do I just install the deb file?

quipper8 2010-03-19 00:25

Re: Questions on IPTables & N900
 
Quote:

Originally Posted by Bricker (Post 571669)
Hi,
Can anyone tell me how to install iptables firewall on N900?

As far as I am aware, the default kernel is not compatible with iptables, or is it?
If it's not, how do I install both the compatible kernel and the iptables itself?

correct, iptables is a kernel module in linux but i not in the fremntle kernel.

you would need to compile your own kernel and put it in an image and flash the device with it I believe. Not ure if you cn recompile kernel on device, but I doubt it
Quote:

Originally Posted by Bricker (Post 571669)
I've found some posts which are related to my question but since I am new to Linux I still couldn't understand how to install them :confused:

If you are new to linux, maybe try recopiling a kernel on a desktop distro first before trying it on such a customized embedded kind of device. I am no stranger to linux or even custom kernels, but recompiling a kernel for such a specific device is more thn I want to bite off for sure.

Quote:

Originally Posted by Bricker (Post 571669)

Also, if the default kernel of N900 is not compatible with iptables and if I do a firmware up'grade on my N900, will the compatible kernel got replaced so that I will have to reinstall it again?

yes, most likely. the firmware updates just rewrite that entire part of the filesystem i believe

Quote:

Originally Posted by Bricker (Post 571669)
Thank you in advance. ;)

P.S.: If there's something wrong with what I said, please correct me since I'm not sure if I understood those things properly. All I want is a firewall :D

well, the device is not really running ny service so a firewall isn't really necessary, IMO

Bricker 2010-03-19 00:48

Re: Questions on IPTables & N900
 
Thank you for your answer. :)

By the way, can I just use the package here and how do I use it?:
http://maemo.org/packages/view/iptables/

The explanation says that:
Quote:

"These are the user-space administration tools for the Linux kernel's netfilter and iptables."
Does this mean that it includes the kernel? :confused:


Quote:

Originally Posted by quipper8 (Post 572677)
well, the device is not really running ny service so a firewall isn't really necessary, IMO

Does the device block all incoming connections by default?

zimon 2010-03-19 02:29

Re: Questions on IPTables & N900
 
Quote:

Originally Posted by quipper8 (Post 572677)

well, the device is not really running ny service so a firewall isn't really necessary, IMO


There is sshd available and working for N900.

Bricker 2010-03-19 04:35

Re: Questions on IPTables & N900
 
Quote:

Originally Posted by zimon (Post 572767)
There is sshd available and working for N900.

Thanks. This answers my question on whether the device blocks all incoming connections by default or not. :)

I still need some help on iptables though :(

rambo 2010-03-19 06:56

Re: Questions on IPTables & N900
 
Also discussed in this thread.

I'm still not 100% sure you cannot not do very basic iptables (setting input policy to drop for example) with the stock kernel.

I have not tried it and I'm running a custom kernel because I'm developing a mobile hotspot.

Compiling a new kernel (or just modules in case they do not require any special/extended symbols in the kernel proper, but netfilter does...) is not really that hard once you have a working scratchbox (see for example the bottom of the hotspot project page).

There is also kernel-maemo which is a (separate) custom kernel with even more features than the hotspot one (which basically adds only netfilter and qos).

As for "sshd available and working" only if you explicitly install it.

Bricker 2010-03-20 03:16

Re: Questions on IPTables & N900
 
By stock kernel, did you mean the default kernel which came with the device?
And if it is, has anyone tried?

Bricker 2010-03-20 06:08

Re: Questions on IPTables & N900
 
Quote:

Originally Posted by rambo (Post 572880)
.I'm still not 100% sure you cannot not do very basic iptables (setting input policy to drop for example) with the stock kernel.

I think this basic iptables suit my needs enough.
All I want is to block all incoming connection and block unused outgoing ports, allowing only outgoing ports that I use.

Bricker 2010-03-21 01:18

Re: Questions on IPTables & N900
 
Can anyone help me further? :( :( :(

gobuki 2010-03-21 01:30

Re: Questions on IPTables & N900
 
Next step would be to make yourself familiar with compiling a custom kernel. But there be dragons. You have to be brave to go further :-)

Bricker 2010-03-21 12:46

Re: Questions on IPTables & N900
 
I'm still unclear on some things.
1. What is meant by "stock kernel"? Is it the default kernel which came with the device?
Then, does it work for basic IPTables commands? (someone please verify this for me :confused: , because I don't have a N900 with me at the moment)

2. If it doesn't, then does one of the packages here:
http://maemo.org/packages/view/iptables/
modifies the kernel or do I have to modify the kernel before installing the package? Which package can I use for N900?

Once again, thank you in advance.
:D:D:D

therock 2010-03-21 12:53

Re: Questions on IPTables & N900
 
ehm why compile custom kernel when then default one works fine with iptables?



got iptables on mine

gobuki 2010-03-21 12:57

Re: Questions on IPTables & N900
 
I didn't know that. I thought i read somewhere else that it isn't possible with stock kernel.

But yeah. stock kernel means the pre installed kernel.

Therock, would you share your iptables script? I tried using iptables yesterday and got an error message for the target ACCEPT.

Did you do anything else but install the iptables package and "modprobe ip_tables"?

therock 2010-03-21 13:17

Re: Questions on IPTables & N900
 
modprobe iptable_filter

and then i just had the "apt-get install iptables"

and wolla you got iptables and you can create your own rules

Bricker 2010-03-22 04:34

Re: Questions on IPTables & N900
 
Thanks guys :D

MJ m 2012-04-10 09:14

Re: Questions on IPTables & N900
 
so,i understood iptables is compatible with stock kernel but not with kernel-power what can be downloaded from maemo.org repository?

thanks


All times are GMT. The time now is 07:09.

vBulletin® Version 3.8.8