firewall setup for SVN

Hello,

I am a fresh for mikrotik, and currently use CCR1036 for router, I want to setup a fallwall rule to allow the svn to download data from externet, and drop all other connections. How to achieve this?

assume the router ip is 192.168.8.1, and the machine ip is 192.168.8.8, the svn server ip is: www.svnserver.com and the svn port is 3690.

I set the rule as below, but failed:
add action=accept chain=forward dst-port=3690 protocol=tcp src-address=192.168.8.8 dst-address list=svnserver
add action=drop chain=forward src-address=192.168.8.0/24

1, svnserver is the Address list which set in IP/Firewall/Address Lists
2, when run svn command(svn up) in terminal, the error information is: svn: Unknown hostname ‘www.svnserver.com

Your rules are not wrong, but the result depends also on other rules you have. Right now your problem is that DNS doesn’t seem to be working. Depending on what you configured, you either need to allow access to external server (udp port 53) or to router.

Hello,

I accept the udp for 53, but still unknow hostname, any suggest?

If it’s unknown hostname, then DNS doesn’t work as it should. What does the machine use as DNS server? If it’s router, you need to allow port 53 in input chain, and you also need:

/ip dns
set allow-remote-requests=yes servers=<some working DNS servers>

If it’s some other server, you need to allow connections it its port 53 in forward chain.