Community discussions

MikroTik App
 
rusoo7
just joined
Topic Author
Posts: 9
Joined: Tue Jun 23, 2015 12:07 pm

Help with NAT Firewall Rule with Address List of Countries

Wed Mar 30, 2016 5:25 pm

Hello,

I try to filter one of the servers HTTP access by source address list. I've used address list for RDP Whitelist IPs and it works. In this case I have 1 range and 2 IPs assigned to the whitelist.
ip firewall nat add action=dst-nat chain=dstnat dst-address=1.2.3.4 protocol=6 dst-port=3389 src-address-list=WHITELIST to-addresses=192.168.168.24
However, when i try to do the same for HTTP the sites don't load. US Address List consists of almost 50,000 IP Ranges.
ip firewall nat add action=dst-nat chain=dstnat dst-address=1.2.3.4 protocol=6 dst-port=80 src-address-list=US to-addresses=192.168.168.24
 
User avatar
ShayanFiroozi
Member Candidate
Member Candidate
Posts: 281
Joined: Sat Jun 01, 2013 12:44 pm
Location: Bandar Abbas , Iran

Re: Help with NAT Firewall Rule with Address List of Countries

Wed Mar 30, 2016 8:43 pm

Hi,
is 192.168.168.24 your web server ??
 
rusoo7
just joined
Topic Author
Posts: 9
Joined: Tue Jun 23, 2015 12:07 pm

Re: Help with NAT Firewall Rule with Address List of Countries

Wed Mar 30, 2016 8:51 pm

Yes
 
User avatar
ShayanFiroozi
Member Candidate
Member Candidate
Posts: 281
Joined: Sat Jun 01, 2013 12:44 pm
Location: Bandar Abbas , Iran

Re: Help with NAT Firewall Rule with Address List of Countries

Wed Mar 30, 2016 9:11 pm

add action=dst-nat chain=dstnat dst-address=1.2.3.4 dst-port=80 protocol=tcp src-address-list=US to-addresses=192.168.168.24 to-ports=80

it should work unless you have other firewall rules or NAT rules , also make sure your web server is HTTP not HTTPS
 
rusoo7
just joined
Topic Author
Posts: 9
Joined: Tue Jun 23, 2015 12:07 pm

Re: Help with NAT Firewall Rule with Address List of Countries

Wed Mar 30, 2016 10:25 pm

I just have basic filter rules, to drop invalid, allow established and related, then drop everything else. The thing is this rule works if I remove the source address list. The moment I add the address list I loose Http connection to the sites. This server has multiple ips and I do use https but for the sake of the testing I choose ip with sites that use only port 80.

Who is online

Users browsing this forum: Deyan, jfuu and 21 guests