Community discussions

MikroTik App
 
Vigo
just joined
Topic Author
Posts: 3
Joined: Sun Jan 30, 2022 1:42 pm

webserver forwarding from LAN

Mon Oct 24, 2022 3:47 pm

Hello, i cant get my webserver forwarding to work, i changed router from edgemax-x to mikrotik. on edgemax works everything fine, so it must be something wrong set on my new mikrotik.
i started with default config, it did not work, so i though that must be something wrong on firewall rulles, I reset it i set it to manual without firewall rules, only nat masquarade and this.

/ip firewall nat
add action=masquerade chain=srcnat out-interface="ether1[INTERNET]"
add action=dst-nat chain=dstnat comment=forwrad dst-port=80 protocol=tcp \
to-addresses=192.168.1.110 to-ports=80

and when i go to my public IP, nothing there.
here is my complete setup. Thx for help

# oct/24/2022 14:31:08 by RouterOS 6.49.7
# software id =
#
# model = RB750Gr3
# serial number =
/interface bridge
add name=LAN
/interface ethernet
set [ find default-name=ether1 ] name="ether1[INTERNET]"
/interface list
add name=WAN
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip pool
add name=dhcp ranges=192.168.1.2-192.168.1.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=LAN lease-time=10h name=dhcp1
/interface bridge port
add bridge=LAN interface=ether2
add bridge=LAN interface=ether3
add bridge=LAN interface=ether4
add bridge=LAN interface=ether5
/ip neighbor discovery-settings
set discover-interface-list=!dynamic
/interface list member
add interface="ether1[INTERNET]" list=WAN
add interface=LAN
/ip address
add address= xx.xx.xx.142/30 interface="ether1[INTERNET]" network=xx.xx.xx.140
add address=192.168.1.1/24 interface=LAN network=192.168.1.0
/ip arp
add address=192.168.1.40 interface=LAN mac-address=D0:67:E5:17:34:C0
add address=192.168.1.110 interface=LAN mac-address=08:00:27:AA:C3:1F
add address=192.168.1.120 interface=LAN mac-address=08:00:27:CD:7C:2A
add address=192.168.1.150 interface=LAN mac-address=08:00:27:9E:33:B3
add address=192.168.1.200 interface=LAN mac-address=D4:5D:64:D7:2A:B0
add address=10.6.83.141 interface="ether1[INTERNET]" mac-address=\
AC:1F:6B:A4:D0:3F
/ip dhcp-server network
add address=192.168.1.0/24 dns-server=\
192.168.1.1,8.8.8.8,8.8.4.4,10.255.255.10 gateway=192.168.1.1
/ip dns
set servers=192.168.1.1,8.8.8.8,10.255.255.10,8.8.4.4
/ip firewall nat
add action=masquerade chain=srcnat out-interface="ether1[INTERNET]"
add action=dst-nat chain=dstnat comment=forwrad dst-port=80 protocol=tcp \
to-addresses=192.168.1.110 to-ports=80
/ip route
add distance=1 gateway=xx.xx.xx.141
/ip service
set telnet disabled=yes
set ftp disabled=yes
set www disabled=yes
set ssh disabled=yes
set api disabled=yes
set api-ssl disabled=yes
/system clock
set time-zone-name=Europe/Prague
/system identity
set name=VigoTik
 
Sob
Forum Guru
Forum Guru
Posts: 9049
Joined: Mon Apr 20, 2009 9:11 pm

Re: webserver forwarding from LAN

Mon Oct 24, 2022 4:10 pm

/ip firewall nat
add chain=dstnat dst-address=xx.xx.xx.142 protocol=tcp dst-port=80 action=dst-nat to-addresses=192.168.1.110
add chain=srcnat src-address=192.168.1.0/24 dst-address=192.168.1.0/24 action=masquerade
More details: viewtopic.php?t=179343
And you probably do want some firewall: viewtopic.php?t=180838
 
Vigo
just joined
Topic Author
Posts: 3
Joined: Sun Jan 30, 2022 1:42 pm

Re: webserver forwarding from LAN  [SOLVED]

Mon Oct 24, 2022 4:33 pm

Holy molly it is working, thank you kind sir.

Who is online

Users browsing this forum: No registered users and 5 guests