You are not logged in.

#1 2006-10-10 10:06:17

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Opening a port while an app is working.

I use iptables for reaching a 'perfect stealth status' at grc.com tests.
And it is nice and good, but sometime for doing my job or using programs (e.g bittorent) I need opening ports for an app. I can set the rule of course, but I think it is pretty stupid keeping closed the port instead of 'stealth', it is not possible making that iptables open the ports while the application is running and hiding it again when the app does not work anymore?

I was thinking a script like:
iptables --append INPUT -p tcp --dport 80 -j ACCEPT
/usr/bin/myhttpserver
iptables --delete INPUT -p tcp --dport 80 -j ACCEPT

but I need root rights... and allowing iptables via sudo seems a little dangerous...
any idea?

Offline

#2 2006-10-10 22:25:08

allucid
Member
Registered: 2006-01-06
Posts: 259

Re: Opening a port while an app is working.

Just leave the bt port open in iptables. If you are not running a service on the port then it is effectively closed.

Also, I looked at grc.com real quick (I was not impressed) and I'm not sure what 'test' you are referring to.

Offline

#3 2006-10-11 06:42:40

xterminus
Member
From: Tacoma, WA, USA, Earth, Sol, M
Registered: 2005-10-30
Posts: 93

Re: Opening a port while an app is working.

allucid wrote:

Just leave the bt port open in iptables. If you are not running a service on the port then it is effectively closed.

Also, I looked at grc.com real quick (I was not impressed) and I'm not sure what 'test' you are referring to.

You could use something like firestarter and "lock" your firewall down when your not surfing the net.  When your ready to surf again, just unlock it and go nuts.

Offline

#4 2006-10-11 07:16:30

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: Opening a port while an app is working.

I was thinking about a script that every second or so checks all symbolic links /proc/[1-9][0-9]*/exe and if a particular program is going it opens the ports when it stops it closes.
Does it sound a good idea?


allucid wrote:

Also, I looked at grc.com real quick (I was not impressed) and I'm not sure what 'test' you are referring to.

This one: https://www.grc.com/x/ne.dll?bh0bkyd2 , it is mainly for Windows user actually. But I found it interesting anyway.


Just for personal knowledge, what do you mean I am not impressed? It is just a port probing test...

Offline

Board footer

Powered by FluxBB