PDA

View Full Version : how to distinguish the ip throughput from ethernet and usb port


Marco Peng
03-07-2009, 02:55 PM
Hi all

thanks for reading :-)
the kernel version is 2.6.x
my board has two ports ehternet/usb can be used to bear the ip
throughput.
so a user can config the board by httpd via the both ports.
but sometime I want to block the access to httpd from the usb port,
how can I do that? Is there a easy way to go?

Marco Peng

cs_posting@hotmail.com
20-07-2009, 06:39 AM
On Jul 2, 9:55 pm, Marco Peng <marco.p...@gmail.com> wrote:

> thanks for reading :-)
> the kernel version is 2.6.x
> my board has two ports ehternet/usb can be used to bear the ip
> throughput.
> so a user can config the board by httpd via the both ports.
> but sometime I want to block the access to httpd from the usb port,
> how can I do that? Is there a easy way to go?

Seems you could either configure the httpd (whichever one you are
using) to not listen on the USB network interface, or perhaps just not
enable the USB network interface at all.

You probably want to look in the documentation for the httpd you are
using.

Or if you want to disable the USB net interface, try to stop loading
the driver modules or skip the ifconfig for that interface - look in
the startup scripts.

A somewhat heavy handed but nonethless expedient method can be to cd
to /etc on the device or the staging of what will become its
filesystem and issue a recursive grep for likely keywords and see what
you find. This will usually lead you to a means of disabling
something, though often you will not end up disabling it in the
preffered manner.

Dirk Zabel
28-07-2009, 10:56 PM
cs_posting@hotmail.com schrieb:
> On Jul 2, 9:55 pm, Marco Peng <marco.p...@gmail.com> wrote:
>
>> thanks for reading :-)
>> the kernel version is 2.6.x
>> my board has two ports ehternet/usb can be used to bear the ip
>> throughput.
>> so a user can config the board by httpd via the both ports.
>> but sometime I want to block the access to httpd from the usb port,
>> how can I do that? Is there a easy way to go?
>
> Seems you could either configure the httpd (whichever one you are
> using) to not listen on the USB network interface, or perhaps just not
> enable the USB network interface at all.
>
> You probably want to look in the documentation for the httpd you are
> using.
>
> Or if you want to disable the USB net interface, try to stop loading
> the driver modules or skip the ifconfig for that interface - look in
> the startup scripts.
>
> A somewhat heavy handed but nonethless expedient method can be to cd
> to /etc on the device or the staging of what will become its
> filesystem and issue a recursive grep for likely keywords and see what
> you find. This will usually lead you to a means of disabling
> something, though often you will not end up disabling it in the
> preffered manner.
>
>
I understand the OP that he wants to temporarily disable http access via
the usb network device. So maybe he could block port 80 of the usb
network interface via iptables.
Regards
Dirk