This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using nmap from inside network to Internet

I need to do some pentesting for work, but when I scan our website, Nmap returns ports that I know are not open. It does this for any site I scan.

The scans are done from a non proxied network on my internal network. 

Nmap ---> Astaro ---> Internet --->website

Does scanning through the Astaro show open ports on the the inside of Astaro?

Our site:
Scanned at 2012-07-03 22:25:23 EDT for 6s
Not shown: 997 filtered ports
PORT     STATE SERVICE
80/tcp   open  http 554/tcp  open   rtsp
3389/tcp closed ms-term-serv
7070/tcp open   realserver
8080/tcp closed http-proxy


What gives with port 554 and 7070?

Thanks, 

C68


This thread was automatically locked due to age.
  • Hi, what version of Astaro?

    I ran
    iptables -n -L|grep -e '554\|7070'

    on my 8.3x box, and didn't see any rules for those ports.

    Do you have VOIP security enabled?

    Barry
  • I don't know about your specific needs, but I'd setup a snat for your testing station and an appropriate firewall rule to "keep it clean."
  • Barry,

    No, I do not have any VOIP stuff at all.

    Bruce,

    Can you please explain what you mean? 

    ----------------------------------------------------------------------
    Here is the same scans from my workplace
    My own site:
    PORT     STATE SERVICE
    21/tcp   open  ftp 554/tcp open rtsp 
    993/tcp open imaps 
    7070/tcp open realserver 
    ----------------------------------------------------------

    scanme.nmap.org (Seems wrong too...)
    PORT     STATE SERVICE
    80/tcp   open  http
    9929/tcp open  nping-echo
    31337/tcp closed Elite
    --------------------------------Original scan--------------------------
    scanme.nmap.org
    Not shown: 990 filtered ports
    PORT STATE SERVICE
    80/tcp open http
    110/tcp closed pop3
    111/tcp closed rpcbind
    113/tcp closed auth
    256/tcp closed fw1-secureremote
    443/tcp closed https
    554/tcp open rtsp
    3389/tcp closed ms-term-serv
    7070/tcp open realserver
    8080/tcp closed http-proxy
    --------------------------------------------

    Thank you,

    C68
  • Hi, you still didn't say what version of Astaro you're using.

    Bruce's suggestion for an SNAT would work IF you have a second external IP; if so, you can SNAT the scanning machine to the second IP.

    This is from behind my 8.305 firewall... I ran several scans because the first one seems incomplete (80 and 443 are open on the firewall):

    [root@mail ~]# nmap -p 1-1024 scanme.nmap.org

    Starting Nmap 4.11 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2012-07-06 14:07 PDT
    Interesting ports on scanme.nmap.org (74.207.244.221):
    Not shown: 1021 filtered ports
    PORT   STATE  SERVICE
    21/tcp closed ftp
    25/tcp closed smtp
    53/tcp closed domain

    Nmap finished: 1 IP address (1 host up) scanned in 13.638 seconds
    [root@mail ~]# nmap -p 80,443 scanme.nmap.org

    Starting Nmap 4.11 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2012-07-06 14:11 PDT
    Interesting ports on scanme.nmap.org (74.207.244.221):
    PORT    STATE  SERVICE
    80/tcp  open   http
    443/tcp closed https

    Nmap finished: 1 IP address (1 host up) scanned in 0.130 seconds
    [root@mail ~]# nmap -p 554,7070 scanme.nmap.org

    Starting Nmap 4.11 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2012-07-06 14:11 PDT
    Interesting ports on scanme.nmap.org (74.207.244.221):
    PORT     STATE    SERVICE
    554/tcp  filtered rtsp
    7070/tcp filtered realserver

    Nmap finished: 1 IP address (1 host up) scanned in 1.333 seconds
    [root@mail ~]# nmap -p 554,7070,9999 scanme.nmap.org

    Starting Nmap 4.11 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2012-07-06 14:12 PDT
    Interesting ports on scanme.nmap.org (74.207.244.221):
    PORT     STATE    SERVICE
    554/tcp  filtered rtsp
    7070/tcp filtered realserver
    9999/tcp filtered abyss

    Nmap finished: 1 IP address (1 host up) scanned in 1.330 seconds

    [root@mail ~]# nmap -p 1-1024 scanme.nmap.org

    Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2012-07-06 14:16 PDT
    Interesting ports on scanme.nmap.org (74.207.244.221):
    Not shown: 1021 filtered ports
    PORT   STATE  SERVICE
    25/tcp closed smtp
    53/tcp closed domain
    80/tcp open   http

    Nmap finished: 1 IP address (1 host up) scanned in 13.537 seconds



    If you're running 8.3x, with VOIP off, all I can think is there must be a misconfiguration.

    Barry
  • I am on the latest version of 7 still. I only have one external IP.
  • Starting Nmap 4.11 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2012-07-06 14:11 PDT
    Interesting ports on scanme.nmap.org (74.207.244.221):
    PORT STATE SERVICE
    554/tcp filtered rtsp   astaro gateway subnet #1
    Not shown: 998 filtered ports
    PORT     STATE SERVICE
    554/tcp  open  rtsp
    7070/tcp open  realserver

    Not shown: 996 filtered ports (My site with extra stuff  and missing stuff) subnet 1
    PORT     STATE SERVICE
    80/tcp   open  http
    443/tcp  open  https
    554/tcp  open  rtsp
    7070/tcp open  realserver


    It does not do this on my primary subnet.

    Not shown: 996 filtered ports (My website - this is accurate) Subnet 2
    PORT     STATE SERVICE
    21/tcp   open  ftp
    80/tcp   open  http
    443/tcp  open  https
    3306/tcp open  mysql

    I am looking into my firewall rules. Subnet 1 is my VOD/Frontier FIOS network and those ports might of had to be open in the firewall. 

    Not shown: 993 closed ports (FIOS router gateway side)
    PORT     STATE SERVICE
    23/tcp   open  telnet
    80/tcp   open  http
    443/tcp  open  https
    992/tcp  open  telnets
    4567/tcp open  unknown
    8080/tcp open  http-proxy
    8443/tcp open  https-alt

    Thanks, 

    C68
  • Interesting ports on scanme.nmap.org (74.207.244.221):
    PORT STATE SERVICE
    554/tcp filtered rtsp  


    I get it as filtered, you get it as OPEN. That is completely different.



    This is confusing... why does it sometimes detect the Astaro?
    ...
    I am looking into my firewall rules. Subnet 1 is my VOD/Frontier FIOS network and those ports might of had to be open in the firewall. 


    Try running nmap against the internal IP of the firewall and see what you get.

    Did you run the 'grep' command I mentioned earlier?

    Barry
  • I'm running 7.5x at home; I still don't get results like yours.

    Here's what I get if I scan the home firewall's internal IP from my WinXP PC:


    C:\Documents and Settings\barry>nmap -p 1-1024,7070 192.168.11.1
    Starting Nmap 5.21 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2012-07-08 16:23 Pacific Daylight Time
    Nmap scan report for 192.168.1.1
    Host is up (0.00s latency).
    Not shown: 1022 filtered ports
    PORT    STATE SERVICE
    22/tcp  open  ssh
    53/tcp  open  domain
    113/tcp open  auth
    MAC Address: 00:24:21:2E:63:A5 (Micro-star Int'l CO.)
    Nmap done: 1 IP address (1 host up) scanned in 21.63 seconds


    Barry
  • Sorry for the late reply. Between work and studying I forgot about this issue!

    Here my nmap output from my "Internal locked down network":

    -----------Locked Down------------------------------------------------
    Astaro interface

    nmap -p 1-1024,7070 192.168.2.100

    Starting Nmap 5.00 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2012-08-07 21:01 EDT
    Interesting ports on 192.168.2.100:
    Not shown: 1023 filtered ports
    PORT    STATE SERVICE
    53/tcp  open  domain
    443/tcp open  https

    ------------ locked down with -PN-------------------------------------
    Astaro interface with -PN added to command

    Starting Nmap 5.00 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2012-08-07 21:31 EDT
    Interesting ports on 192.168.2.100:
    Not shown: 440 filtered ports
    PORT    STATE SERVICE
    22/tcp  open  ssh 
    53/tcp  open  domain
    443/tcp open  https

    ----------------------Locked Down--------------------------------------
    scanme.nmap.org

    Starting Nmap 5.00 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2012-08-07 21:03 EDT
    Interesting ports on scanme.nmap.org (74.207.244.221):
    Not shown: 1021 filtered ports
    PORT    STATE  SERVICE
    53/tcp  closed domain
    80/tcp  open   http
    443/tcp closed https
    995/tcp closed pop3s


    Same scan from my "open unlocked down network" shows a huge amount of open ports that should not be there. Then a thought struck me... it is going through the Frontier router. 

    -------------Unlocked network--------------------------------------
    Frontier router

    Starting Nmap 5.00 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2012-08-07 21:12 EDT
    Interesting ports on Wireless_Broadband_Router.home (192.168.1.1):
    Not shown: 993 closed ports
    PORT     STATE SERVICE
    23/tcp   open  telnet
    80/tcp   open  http
    443/tcp  open  https
    992/tcp  open  telnets
    4567/tcp open  unknown
    8080/tcp open  http-proxy
    8443/tcp open  https-alt
    ------------------------unlocked network----------------------
    scanme.nmap.org

    Starting Nmap 5.00 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2012-08-07 21:12 EDT
    Interesting ports on Wireless_Broadband_Router.home (192.168.1.1):
    Not shown: 993 closed ports
    PORT     STATE SERVICE
    23/tcp   open  telnet
    80/tcp   open  http
    443/tcp  open  https
    992/tcp  open  telnets
    4567/tcp open  unknown
    8080/tcp open  http-proxy
    8443/tcp open  https-alt
    -------------Unlocked network-----------------------------------
    Astaro interface

    Starting Nmap 5.00 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2012-08-07 21:16 EDT
    Note: Host seems down. If it is really up, but blocking our ping probes, try -PN
    Nmap done: 1 IP address (0 hosts up) scanned in 3.06 seconds

    ------Adding -PN----------unlocked network-----------
    Starting Nmap 5.00 ( Nmap - Free Security Scanner For Network Exploration & Security Audits. ) at 2012-08-07 21:17 EDT
    Interesting ports on 192.168.0.100:
    Not shown: 1022 filtered ports
    PORT     STATE  SERVICE
    113/tcp  closed auth
    554/tcp  open   rtsp WHY OPEN???
    7070/tcp open   realserver WHY OPEN???


    It appears the Frontier router is to blame for all but 7070. I still can't explain that darn 7070. It is on the Astaro Interface!!

    Interesting ports on 192.168.0.100: (Astaro interface on unlocked network)
    PORT     STATE SERVICE     VERSION
    7070/tcp open  realserver? filtered realserver 
  • Hi,
    When you rebuild with v9, see if you can do a scan before restoring your config backup.

    Also, you can run
    netstat -an|grep 7070 
    on the firewall and see if anything shows up.

    Barry