Community discussions

MikroTik App
 
subseven
just joined
Topic Author
Posts: 15
Joined: Mon Mar 31, 2014 4:56 pm

Port 80 always open

Mon Mar 31, 2014 5:10 pm

I connected my new Mikrotik Router rb951g-2hnd (standard configuration) and made a portscan from wan to my router.
Port 80 is alwas open (nmap portscanner)
All the standard Firewall rules are activated and I even deactivated the web management service.
Wich rule I have to make to block port 80?
The standard forward Firewall rules only allow established connections, so I wondering.
Can somebody please help me? Probably it's quite easy :lol:
 
User avatar
rickfrey
Trainer
Trainer
Posts: 609
Joined: Sun Feb 14, 2010 11:41 pm
Location: Van, Texas
Contact:

Re: Port 80 always open

Wed Apr 02, 2014 5:38 pm

Are you scanning from the LAN side or the WAN side?
 
subseven
just joined
Topic Author
Posts: 15
Joined: Mon Mar 31, 2014 4:56 pm

Re: Port 80 always open

Wed Apr 02, 2014 5:55 pm

I'm scanning from the wan-side from a different location.
 
bingo220
Member Candidate
Member Candidate
Posts: 126
Joined: Sun Sep 22, 2013 9:30 pm
Location: Ukraine

Re: Port 80 always open

Wed Apr 02, 2014 7:32 pm

/ip firewall filter
add chain=input protocol=icmp action=accept comment=”Allow Ping”
add chain=forward protocol=icmp action=accept
add chain=input connection-state=established action=accept comment=”Accept established connections”
add chain=forward connection-state=established action=accept
add chain=input connection-state=related action=accept comment=”Accept related connections”
add chain=forward connection-state=related action=accept
add chain=input connection-state=invalid action=drop comment=”Drop invalid connections”
add chain=forward connection-state=invalid action=drop
add chain=input protocol=udp action=accept comment=”Allow UDP”
add chain=forward protocol=udp action=accept
add chain=forward src-address=192.168.88.0/24 action=accept comment=”Access to Internet from local network”
add chain=input src-address=192.168.88.0/24 action=accept comment=”Access to Mikrotik only from our local network”
add chain=input action=drop comment=”All other drop”
add chain=forward action=drop
 
subseven
just joined
Topic Author
Posts: 15
Joined: Mon Mar 31, 2014 4:56 pm

Re: Port 80 always open

Wed Apr 02, 2014 9:55 pm

/ip firewall filter
add chain=input protocol=icmp action=accept comment=”Allow Ping”
add chain=forward protocol=icmp action=accept
add chain=input connection-state=established action=accept comment=”Accept established connections”
add chain=forward connection-state=established action=accept
add chain=input connection-state=related action=accept comment=”Accept related connections”
add chain=forward connection-state=related action=accept
add chain=input connection-state=invalid action=drop comment=”Drop invalid connections”
add chain=forward connection-state=invalid action=drop
add chain=input protocol=udp action=accept comment=”Allow UDP”
add chain=forward protocol=udp action=accept
add chain=forward src-address=192.168.88.0/24 action=accept comment=”Access to Internet from local network”
add chain=input src-address=192.168.88.0/24 action=accept comment=”Access to Mikrotik only from our local network”
add chain=input action=drop comment=”All other drop”
add chain=forward action=drop
Thank you for your answer.
I put in all the rules but now not only port 80 is open (tcp). Now even port 53 (udp) is open :D
 
User avatar
docmarius
Forum Guru
Forum Guru
Posts: 1224
Joined: Sat Nov 06, 2010 12:04 pm
Location: Timisoara, Romania
Contact:

Re: Port 80 always open

Thu Apr 03, 2014 12:13 am

You should consider disabling the www service for your wan port under IP -> Services:

/ip service
set www address=192.168.88.0/24

or even disable it completely:

/ip service
set www disabled=yes
 
subseven
just joined
Topic Author
Posts: 15
Joined: Mon Mar 31, 2014 4:56 pm

Re: Port 80 always open

Thu Apr 03, 2014 8:12 am

thank you docmarius.
I already did this.
 
bingo220
Member Candidate
Member Candidate
Posts: 126
Joined: Sun Sep 22, 2013 9:30 pm
Location: Ukraine

Re: Port 80 always open

Thu Apr 03, 2014 10:45 am

I put in all the rules but now not only port 80 is open (tcp). Now even port 53 (udp) is open :D
udp 53 is open because of:
add chain=input protocol=udp action=accept comment=”Allow UDP”
Disable it if you need.
 
subseven
just joined
Topic Author
Posts: 15
Joined: Mon Mar 31, 2014 4:56 pm

Re: Port 80 always open

Thu Apr 03, 2014 11:26 am

I put in all the rules but now not only port 80 is open (tcp). Now even port 53 (udp) is open :D
udp 53 is open because of:
add chain=input protocol=udp action=accept comment=”Allow UDP”
Disable it if you need.
Yes I disabled it. But port 80 is still open. What service is still running?
 
bingo220
Member Candidate
Member Candidate
Posts: 126
Joined: Sun Sep 22, 2013 9:30 pm
Location: Ukraine

Re: Port 80 always open

Thu Apr 03, 2014 12:52 pm

subseven, port 80 takes "www" service.
It has to be closed if you followed this post:
You should consider disabling the www service for your wan port under IP -> Services:

/ip service
set www address=192.168.88.0/24

or even disable it completely:

/ip service
set www disabled=yes
 
subseven
just joined
Topic Author
Posts: 15
Joined: Mon Mar 31, 2014 4:56 pm

Re: Port 80 always open

Thu Apr 03, 2014 2:00 pm

subseven, port 80 takes "www" service.
It has to be closed if you followed this post:
You should consider disabling the www service for your wan port under IP -> Services:

/ip service
set www address=192.168.88.0/24

or even disable it completely:

/ip service
set www disabled=yes
already followed:
"thank you docmarius.
I already did this."
 
subseven
just joined
Topic Author
Posts: 15
Joined: Mon Mar 31, 2014 4:56 pm

Re: Port 80 always open

Thu Apr 03, 2014 5:39 pm

I want to apologize. I scanned from a remote network. This network is behind a pfsense firewall (proxy).
So Nmap thought port 80 is open.
Sorry again! :?
 
User avatar
rickfrey
Trainer
Trainer
Posts: 609
Joined: Sun Feb 14, 2010 11:41 pm
Location: Van, Texas
Contact:

Re: Port 80 always open

Thu Apr 03, 2014 5:45 pm

No worries :D