"Stealth up" port 80


 
Thread Tools Search this Thread
Special Forums Cybersecurity "Stealth up" port 80
# 1  
Old 08-12-2010
"Stealth up" port 80

ipables - stealth port 80

This is how I did set up my iptables. It's basic, easy and simple, but it suits my needs.

Code:
    iptables -A INPUT -i lo -j ACCEPT
    iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
    iptables -A INPUT -p tcp --dport 80 -j ACCEPT
    iptables -A INPUT -j DROP

What I'm not happy yet is about port 80. At the "stealth up" test, it is shown as closed. I would rather prefer it to be stealth. i know most people advocate that closed or stealth, is equally secure. I wouldn't argue that. It's just because, if there's no difference, then my preference is to have it shown stealth.

Now, I'm quite new to Linux and don't have a clue about getting that change done. I tried to search for a solution here in the forums, but got a 4 page results.... and also tried earlier to google it, with no success.

Any help would be much appreciated.

Last edited by pludi; 08-12-2010 at 02:13 AM.. Reason: code tags, please...
This User Gave Thanks to wiluni For This Post:
# 2  
Old 08-12-2010
First, what's the "Stealth Up" test? Never heard of it.
Second, how can Port 80 show up "closed" if it's explicitly opened (line 3)?
Third, unless this is your home box I'd leave the SSH port open, too.
# 3  
Old 08-12-2010
"Shields up" port 80

Quote:
Originally Posted by pludi
First, what's the "Stealth Up" test? Never heard of it.
Second, how can Port 80 show up "closed" if it's explicitly opened (line 3)?
Third, unless this is your home box I'd leave the SSH port open, too.
You are totally right. There's some typos at my post.

"First, what's the "Stealth Up" test? Never heard of it."
What I wanted to mean is a test under (or linked by) "grc dot com". They call it the "Shields up!" One of the services they offer, as per the user choice, is a scan of "all service ports" under the IP number of that user. Ok. I'm sure you got it now.

Following my IP number "being carefully examined", from ports 0 to 1055, the results were: "Failed"

because:
1 - "Solicited TCP Packets: RECEIVED (FAILED) - As detailed in the port report below, one or more of your system's ports actively responded to our deliberate attempts to establish a connection. It is generally possible to increase your system's security by hiding it from the probes of potentially hostile hackers. Please see the details presented by the specific port links below, as well as the various resources on this site, and in our extremely helpful and active"

BUT:
2 - "Unsolicited Packets: PASSED - No Internet packets of any sort were received from your system as a side-effect of our attempts to elicit some response from any of the ports listed above. Some questionable personal security systems expose their users by attempting to "counter-probe the prober", thus revealing themselves. But your system remained wisely silent. (Except for the fact that not all of its ports are completely stealthed as shown below.)."
3 - "Ping Echo: PASSED - Your system ignored and refused to reply to repeated Pings (ICMP Echo Requests) from our server."

AND
This is the written report from the test:
GRC Port Authority Report created on UTC: 2010-08-13 at 02:17:11
Results from scan of ports: 0-1055
0 Ports Open
1 Ports Closed
1055 Ports Stealth
---------------------
1056 Ports Tested
NO PORTS were found to be OPEN.
The port found to be CLOSED was: 80
Other than what is listed above, all ports are STEALTH.

TruStealth: FAILED - NOT all tested ports were STEALTH,
- NO unsolicited packets were received,
- NO Ping reply (ICMP Echo) was received.

SO...
As per the above written report, I hope it's clear now why I would like to find a way to have port nº 80 to be shown as "stalth" (of course, if possible and still keeping the possibility to surf the net).
Do you think is better not to care about this people at "grc" and try to find a better way to assure that my system is hardened enough?


ps: pludi: regarding port 80, yes, this is my home box.

Last edited by wiluni; 08-13-2010 at 03:30 AM.. Reason: title plus aesthetics + corrected ... BUT 2-
# 4  
Old 08-13-2010
OK, for surfing you don't need to open port 80/TCP incoming. The system will choose a random high port (>1024) for communication going out to the HTTP port, and others. Besides, hardening a system doesn't stop at configuring your firewall.

As for that site: I wouldn't trust them further than I could throw them.
  • Their freeware for Windows is just a collection of registry fixes or disabling services (which is easy to do yourself).
  • Their main product, Spin Right, was reviewed by an MBA, which doesn't exactly fill me with confidence that he grasped the finer points of data recovery.
  • The product description itself makes me doubt they grasped the concept of magnetic storage (in case anyone of them reads this: ever heard of CRC?)
  • In their "research" about NAT they claim that NAT adds security to a network because it hides the IPs behind it, which is, excuse my language, BS.
# 5  
Old 08-13-2010
pludi, thanks a lot for your answer. What you've said about that site, is in line with a few pieces and beats I had read, here and there. Anyway, I thought the above mentioned test was accurate, although It seemed to me that the conclusion, comparing the graphic result to the written report, was contradictory.

As you said, I understand that "hardening a system doesn't stop at configuring your firewall". The code I used for my firewall is a very basic one, taken somewhere from an Ubuntu wiki for beginners.
Linux hardening is an all vast subject that I've been trying to get through, but I'm aware that I'm yet far to have it all.

Just before closing this thread, or marking it "solved", would you recommend, just for surfing, that I eliminate the code that is closing port 80, and do nothing else, regarding this firewall?

Last edited by wiluni; 08-13-2010 at 03:33 AM.. Reason: eliminate duplication + firewall "just for surfing"
# 6  
Old 08-13-2010
For firewall configuration, you can use the ufw utility, as described here. Other than that, you only need to allow incoming connections to services running on your local box, or are related to an existing connection (by using the conntrack module as in your script).
# 7  
Old 08-13-2010
Ok, thanks. I'll have a look at both, and in the meanwhile, will carry on learning a beat more about this security Linux "world".
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies

2. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

3. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

4. Solaris

The slices "usr", "opt", "tmp" disappeared!!! Help please.

The system don't boot. on the screen appears following: press enter to maintenance (or type CTRL-D to continue)...I checked with format command. ... the slices "0-root","1-swap","2-backup" exist. ...the slises "3-var","6-usr" -unassigned. :( (16 Replies)
Discussion started by: wolfgang
16 Replies

5. Shell Programming and Scripting

how to use "cut" or "awk" or "sed" to remove a string

logs: "/home/abc/public_html/index.php" "/home/abc/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" "/home/xyz/public_html/index.php" how to use "cut" or "awk" or "sed" to get the following result: abc abc xyz xyz xyz (8 Replies)
Discussion started by: timmywong
8 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

8. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
Login or Register to Ask a Question