I have a few issues, that I'm not capable to solve for now and looking for any recommendations from your side. I have made several tests starting with and without default configuration.
For now, I'll post my current configuration which is basic of course, until I solve the main problem which is why I cannot set a static public ip. My provider is giving a static IP and the connection is through fiber. If I follow any guide that I've seen to set a static IP, then I have no connection to the internet. If I change to Automatic and use a DHCP Client, then it gets the static IP and works fine.
Here we are and and any recommendations are welcome. I can provide any more info if needed.
Code: Select all
# 2024-10-22 19:04:28 by RouterOS 7.16.1
# model = C53UiG+5HPaxD2HPaxD
/interface bridge
add admin-mac=XX:XX:XX:XX:XX:XX auto-mac=no comment=defconf name=LOCAL \
port-cost-mode=short
/interface ethernet
set [ find default-name=ether1 ] name="ether1 [INTERNET]"
set [ find default-name=ether2 ] name="ether2 [SERVER]"
set [ find default-name=ether3 ] name="ether3 [SALLOON]"
set [ find default-name=ether4 ] name="ether4 [PC]"
/interface list
add comment=defconf name=WAN
add comment=defconf name=LAN
/ip pool
add name=dhcp ranges=192.168.32.10-192.168.32.254
/ip dhcp-server
add address-pool=dhcp interface=LOCAL lease-time=10m name=defconf
/ip smb users
set [ find default=yes ] disabled=yes
/interface bridge filter
add action=drop chain=forward in-interface=wifi3
add action=drop chain=forward out-interface=wifi3
add action=drop chain=forward in-interface=wifi4
add action=drop chain=forward out-interface=wifi4
/interface bridge port
add bridge=LOCAL comment=defconf interface="ether2 [SERVER]" \
internal-path-cost=10 path-cost=10
add bridge=LOCAL comment=defconf interface="ether3 [SALLOON]" \
internal-path-cost=10 path-cost=10
add bridge=LOCAL comment=defconf interface="ether4 [PC]" internal-path-cost=\
10 path-cost=10
add bridge=LOCAL comment=defconf interface=ether5 internal-path-cost=10 \
path-cost=10
add bridge=LOCAL comment=defconf interface=wifi1 internal-path-cost=10 \
path-cost=10
add bridge=LOCAL comment=defconf interface=wifi2 internal-path-cost=10 \
path-cost=10
add bridge=LOCAL interface=wifi3 internal-path-cost=10 path-cost=10
add bridge=LOCAL interface=wifi4 internal-path-cost=10 path-cost=10
/ip firewall connection tracking
set udp-timeout=10s
/ip neighbor discovery-settings
set discover-interface-list=LAN
/ipv6 settings
set max-neighbor-entries=15360
/interface list member
add comment=defconf interface=LOCAL list=LAN
add comment=defconf interface="ether1 [INTERNET]" list=WAN
/ip address
add address=192.168.32.7/24 comment=defconf interface=LOCAL network=\
192.168.32.0
/ip cloud
set update-time=no
/ip dhcp-client
add interface="ether1 [INTERNET]" use-peer-dns=no
/ip dhcp-server lease
add address=192.168.32.12 client-id=1:XX:XX:XX:XX:XX:f7 mac-address=\
XX:XX:XX:XX:XX:F7 server=defconf
add address=192.168.32.14 client-id=1:XX:XX:XXXX:XX:e9 mac-address=\
XX:XX:XX:XX:XX:E9 server=defconf
/ip dhcp-server network
add address=192.168.32.0/24 comment=defconf dns-server=192.168.32.7 gateway=\
192.168.32.7 netmask=24
/ip dns
set allow-remote-requests=yes servers=1.1.1.1,1.0.0.1
/ip dns static
add address=192.168.32.7 comment=defconf name=router.lan type=A
/ip firewall address-list
add address=192.168.32.10-192.168.32.254 list=LOCAL
/ip firewall filter
add action=accept chain=input comment="accept established,related,untracked" \
connection-state=established,related,untracked
add action=drop chain=input comment="drop invalid" connection-state=invalid
add action=accept chain=input comment="accept ICMP" protocol=icmp
add action=drop chain=input comment="drop all not coming from LAN" \
in-interface-list=!LAN
add action=accept chain=forward comment=\
"accept established,related, untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="drop invalid" connection-state=invalid
add action=accept chain=forward comment="accept in ipsec policy" \
ipsec-policy=in,ipsec
add action=accept chain=forward comment="accept out ipsec policy" \
ipsec-policy=out,ipsec
add action=accept chain=forward comment="internet traffic" in-interface-list=\
LAN out-interface-list=WAN
add action=accept chain=forward comment="port forwarding" \
connection-nat-state=dstnat
add action=drop chain=forward comment="drop all else"
/ip firewall mangle
add action=mark-connection chain=prerouting dst-address-list=INTERNET \
new-connection-mark=HairPin_NAT passthrough=yes src-address-list=LOCAL
/ip firewall nat
add action=masquerade chain=srcnat comment="defconf: masquerade" \
ipsec-policy=out,none out-interface-list=WAN
add action=dst-nat chain=dstnat dst-port=51210 in-interface-list=WAN \
protocol=tcp to-addresses=192.168.32.12 to-ports=51210
add action=dst-nat chain=dstnat dst-port=52181 in-interface-list=WAN \
protocol=tcp to-addresses=192.168.32.12 to-ports=52181
add action=dst-nat chain=dstnat dst-port=51834 in-interface-list=WAN \
protocol=udp to-addresses=192.168.32.12 to-ports=51834
add action=dst-nat chain=dstnat dst-port=61403 in-interface-list=WAN \
protocol=tcp to-addresses=192.168.32.12 to-ports=61403
add action=dst-nat chain=dstnat dst-port=63099 in-interface-list=WAN \
protocol=tcp to-addresses=192.168.32.12 to-ports=63099
add action=dst-nat chain=dstnat dst-port=63099 in-interface-list=WAN \
protocol=udp to-addresses=192.168.32.12 to-ports=63099
add action=dst-nat chain=dstnat dst-port=2222 in-interface-list=WAN protocol=\
tcp to-addresses=192.168.32.14 to-ports=2222
add action=dst-nat chain=dstnat dst-port=50081 in-interface-list=WAN \
protocol=udp to-addresses=192.168.32.12 to-ports=50081
/ip firewall service-port
set ftp disabled=yes
/ip ipsec profile
set [ find default=yes ] dpd-interval=2m dpd-maximum-failures=5
/ip service
set telnet disabled=yes
set ftp address=192.168.32.0/24 disabled=yes
set www disabled=yes
set ssh address=192.168.32.0/24 port=2222
set api disabled=yes
set winbox address=192.168.32.0/24
set api-ssl disabled=yes
/ip smb shares
set [ find default=yes ] directory=/pub
/ip ssh
set strong-crypto=yes
/ip upnp interfaces
add interface=LOCAL type=internal
add interface="ether1 [INTERNET]" type=external
/ipv6 firewall address-list
add address=::/128 comment="defconf: unspecified address" list=bad_ipv6
add address=::1/128 comment="defconf: lo" list=bad_ipv6
add address=fec0::/10 comment="defconf: site-local" list=bad_ipv6
add address=::ffff:0.0.0.0/96 comment="defconf: ipv4-mapped" list=bad_ipv6
add address=::/96 comment="defconf: ipv4 compat" list=bad_ipv6
add address=100::/64 comment="defconf: discard only " list=bad_ipv6
add address=2001:db8::/32 comment="defconf: documentation" list=bad_ipv6
add address=2001:10::/28 comment="defconf: ORCHID" list=bad_ipv6
add address=3ffe::/16 comment="defconf: 6bone" list=bad_ipv6
/ipv6 firewall filter
add action=accept chain=input comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=input comment="defconf: drop invalid" connection-state=\
invalid
add action=accept chain=input comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=input comment="defconf: accept UDP traceroute" port=\
33434-33534 protocol=udp
add action=accept chain=input comment=\
"defconf: accept DHCPv6-Client prefix delegation." dst-port=546 protocol=\
udp src-address=fe80::/10
add action=accept chain=input comment="defconf: accept IKE" dst-port=500,4500 \
protocol=udp
add action=accept chain=input comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=input comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=input comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=input comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
add action=accept chain=forward comment=\
"defconf: accept established,related,untracked" connection-state=\
established,related,untracked
add action=drop chain=forward comment="defconf: drop invalid" \
connection-state=invalid
add action=drop chain=forward comment=\
"defconf: drop packets with bad src ipv6" src-address-list=bad_ipv6
add action=drop chain=forward comment=\
"defconf: drop packets with bad dst ipv6" dst-address-list=bad_ipv6
add action=drop chain=forward comment="defconf: rfc4890 drop hop-limit=1" \
hop-limit=equal:1 protocol=icmpv6
add action=accept chain=forward comment="defconf: accept ICMPv6" protocol=\
icmpv6
add action=accept chain=forward comment="defconf: accept HIP" protocol=139
add action=accept chain=forward comment="defconf: accept IKE" dst-port=\
500,4500 protocol=udp
add action=accept chain=forward comment="defconf: accept ipsec AH" protocol=\
ipsec-ah
add action=accept chain=forward comment="defconf: accept ipsec ESP" protocol=\
ipsec-esp
add action=accept chain=forward comment=\
"defconf: accept all that matches ipsec policy" ipsec-policy=in,ipsec
add action=drop chain=forward comment=\
"defconf: drop everything else not coming from LAN" in-interface-list=\
!LAN
/system note
set show-at-login=no
/tool bandwidth-server
set enabled=no
/tool mac-server
set allowed-interface-list=LAN
/tool mac-server mac-winbox
set allowed-interface-list=LAN