External connections arriving on same IP?

Hello,

New to routerOS.. still trying to figure it out. Just came from 3 years of DD-WRT.

Subject says it all really. If there is already a post discussing this, please link it.

To be more specific, I’ll explain the situation.
I run an older fCraft server [Minecraft Classic] for a buddy of mine over the internet, and have been for years. After swapping out routers[from DD-WRT to routerOS], this issue has seemed to arrive. Anyone who connects to the server, shows up with the same IP. At first, I had masquerade enabled but swapped it out in favor of src-nat. From what my server sees, this changed from my routers internal lan IP to my external IP provided by my ISP. [Progress?]

But now I’m stumped, not sure what is causing clients to arrive on the same address. Have done hours of searching to no luck. I want to say it’s a NAT issue but again, not sure where to go at this point.

Server in question is located at 10.0.0.122.
My public address given to the router is 108.196.242.6

Box: CRS125-24G-1S
CFW: 3.22
UFW: 3.22
WFG: 6.27

sup-output:

                   uptime: 4d17h5m41s
                  version: 6.27
               build-time: Feb/11/2015 13:24:13
              free-memory: 98.4MiB
             total-memory: 128.0MiB
                      cpu: MIPS 74Kc V4.12
                cpu-count: 1
            cpu-frequency: 600MHz
                 cpu-load: 42%
           free-hdd-space: 109.9MiB
          total-hdd-space: 128.0MiB
  write-sect-since-reboot: 14945
         write-sect-total: 108056
               bad-blocks: 0%
        architecture-name: mipsbe
               board-name: CRS125-24G-1S
                 platform: MikroTik

CLOCK
                  time: 05:01:23
                  date: may/14/2015
  time-zone-autodetect: yes
        time-zone-name: America/Chicago
            gmt-offset: -05:00
            dst-active: yes

IRQs
Flags: ro - read-only
 #    IRQ USERS                                    CPU ACTIVE-CPU         COUNT
 0      3 usb1                                    auto                      539
 1      4 switch0                                 auto               72 167 908
 2     16 beeper                                  auto                    1 602
 3     19 serial                                  auto                       18
 4    112 ts                                      auto                        0

SYSTEM
Linux mydnsname 3.3.5 #2 Wed Feb 11 08:33:33 EET 2015 mips unknown
CPU ACTIVE-CPU         COUNT
 0      3 usb1                                    auto                      539
 1      4 switch0                                 auto               72 167 908
 2     16 beeper                                  auto                    1 602
 3     19 serial                                  auto                       18
 4    112 ts                                      auto                        0

SYSTEM
Linux mydnsname 3.3.5 #2 Wed Feb 11 08:33:33 EET 2015 mips unknown
MEMORY
MemTotal:         125424 kB
MemFree:           72112 kB
Buffers:               0 kB
Cached:            30776 kB
SwapCached:            0 kB
Active:            12476 kB
Inactive:          25844 kB
Active(anon):       8644 kB
Inactive(anon):       64 kB
Active(file):       3832 kB
Inactive(file):    25780 kB
Unevictable:        1264 kB
Mlocked:            1264 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          8828 kB
Mapped:             8380 kB
Shmem:               144 kB
Slab:               9396 kB
SReclaimable:       2820 kB
SUnreclaim:         6576 kB
KernelStack:         568 kB
PageTables:          724 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       62712 kB
Committed_AS:      80268 kB
VmallocTotal:     261940 kB
VmallocUsed:       23052 kB
VmallocChunk:     228492 kB
CPU
system type		: Mikrotik CRS125G
processor		: 0
cpu model		: MIPS 74Kc V4.12
cpu MHz			: 600.000
BogoMIPS		: 299.82
wait instruction	: yes
microsecond timers	: yes
tlb_entries		: 32
extra interrupt vector	: no
hardware watchpoint	: yes, count: 4, address/irw mask: [0x0000, 0x0ff8, 0x0ff8, 0x0ff8]
ASEs implemented	: mips16
shadow register sets	: 1
kscratch registers	: 0
core			: 0
VCED exceptions		: not available
VCEI exceptions		: not available

firewall supout:

# may/14/2015 05:01:23 by RouterOS 6.27
# software id = 
#
/interface bridge
add name=WAN
/interface ethernet
set [ find default-name=ether1 ] name=ether1-wlan
set [ find default-name=ether2 ] name=ether2-wlan
set [ find default-name=ether5 ] master-port=ether4
set [ find default-name=ether6 ] master-port=ether4
set [ find default-name=ether7 ] master-port=ether4
set [ find default-name=ether8 ] master-port=ether4
set [ find default-name=ether9 ] master-port=ether4
set [ find default-name=ether10 ] master-port=ether4
set [ find default-name=ether11 ] master-port=ether4
set [ find default-name=ether12 ] master-port=ether4
set [ find default-name=ether13 ] master-port=ether4
set [ find default-name=ether14 ] master-port=ether4
set [ find default-name=ether15 ] master-port=ether4
set [ find default-name=ether16 ] master-port=ether4
set [ find default-name=ether17 ] master-port=ether4
set [ find default-name=ether18 ] master-port=ether4
set [ find default-name=ether19 ] master-port=ether4
set [ find default-name=ether20 ] master-port=ether4
set [ find default-name=ether21 ] master-port=ether4
set [ find default-name=ether22 ] master-port=ether4
set [ find default-name=ether23 ] master-port=ether4
set [ find default-name=ether24 ] master-port=ether4
set [ find default-name=sfp1 ] master-port=ether4
set [ find default-name=ether3 ] master-port=ether4
/ip pool
add name=dhcp ranges=10.0.0.10-10.0.0.254
/ip dhcp-server
add address-pool=dhcp disabled=no interface=ether4 lease-time=23h name=mdhcp
/ipv6 pool
add name=AT&THSTNTX prefix-length=63
/port
set 0 name=serial0
/queue simple
add disabled=yes name=bandwidth target=108.196.242.6/32
/interface bridge port
add bridge=WAN interface=ether1-wlan
add bridge=WAN interface=ether2-wlan
/ip settings
set accept-redirects=yes
/ip address
add address=10.0.0.1/8 interface=ether4 network=10.0.0.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=ether1-wlan
add add-default-route=no dhcp-options=hostname,clientid disabled=no \
    interface=ether2-wlan
/ip dhcp-server lease
add address=10.0.0.11 client-id=1:0:18:dd:31:cd:11 mac-address=\
    00:18:DD:31:CD:11 server=mdhcp
add address=10.0.0.122 mac-address=D4:3D:7E:4B:AD:EC
add address=10.0.0.120 client-id=1:68:1c:a2:12:2d:f0 mac-address=\
    68:1C:A2:12:2D:F0 server=mdhcp
add address=10.0.0.121 client-id=1:68:1c:a2:12:2d:ef mac-address=\
    68:1C:A2:12:2D:EF server=mdhcp
/ip dhcp-server network
add address=10.0.0.0/8 domain=mydnsname gateway=10.0.0.1 netmask=8
/ip dns
set allow-remote-requests=yes
/ip firewall filter
add action=add-src-to-address-list address-list=ssh_blacklist \
    address-list-timeout=1w3d chain=input comment="SSH Access blockade" \
    connection-state=new disabled=yes dst-port=22 protocol=tcp \
    src-address-list=ssh_stage3
add action=add-src-to-address-list address-list=ssh_stage3 \
    address-list-timeout=1m chain=input connection-state=new disabled=yes \
    dst-port=22 protocol=tcp src-address-list=ssh_stage2
add action=add-src-to-address-list address-list=ssh_stage2 \
    address-list-timeout=1m chain=input connection-state=new disabled=yes \
    dst-port=22 protocol=tcp src-address-list=ssh_stage1
add action=add-src-to-address-list address-list=ssh_stage1 \
    address-list-timeout=1m chain=input connection-state=new disabled=yes \
    dst-port=22 protocol=tcp
/ip firewall nat
add action=src-nat chain=srcnat comment=MAINNAT-DD to-addresses=108.196.242.6
add action=dst-nat chain=dstnat comment="S2-RDP BLAKBAWX" dst-address=\
    108.196.242.6 dst-port=10500 protocol=tcp to-addresses=10.0.0.122 \
    to-ports=10500
add action=masquerade chain=srcnat comment=REVNAT-DD disabled=yes \
    out-interface=ether4
add action=dst-nat chain=dstnat comment=S2-EMBY dst-address=108.196.242.6 \
    dst-port=8920 protocol=tcp to-addresses=10.0.0.122 to-ports=8920
add action=dst-nat chain=dstnat dst-address=108.196.242.6 dst-port=8096 \
    protocol=tcp to-addresses=10.0.0.122 to-ports=8096
add action=dst-nat chain=dstnat dst-address=108.196.242.6 dst-port=8866 \
    protocol=tcp to-addresses=10.0.0.122 to-ports=8866
add action=dst-nat chain=dstnat dst-address=108.196.242.6 dst-port=37218 \
    protocol=tcp to-addresses=10.0.0.122 to-ports=37218
add action=dst-nat chain=dstnat comment=MT-W.AP dst-address=108.196.242.6 \
    dst-port=50041 protocol=tcp to-addresses=10.0.0.4 to-ports=80
add action=dst-nat chain=dstnat comment="S2-Minecraft Classic" dst-address=\
    108.196.242.6 dst-port=25545 protocol=tcp to-addresses=10.0.0.122 \
    to-ports=25545
add action=dst-nat chain=dstnat dst-address=108.196.242.6 dst-port=8042 \
    protocol=tcp to-addresses=10.0.0.11 to-ports=80
add action=dst-nat chain=dstnat disabled=yes dst-port=25565 protocol=tcp \
    to-addresses=10.0.0.122 to-ports=25565
/ip service
set telnet disabled=yes
set ftp disabled=yes
set ssh port=
set api disabled=yes
set winbox disabled=yes
set api-ssl disabled=yes
/ip traffic-flow
set interfaces=ether1-wlan
/ip upnp
set enabled=yes
/ipv6 dhcp-client
add disabled=yes interface=ether1-wlan pool-name=AT&THSTNTX
add disabled=yes interface=ether2-wlan pool-name=AT&THSTNTX
/system clock
set time-zone-name=America/Chicago
/system clock manual
set time-zone=-06:00
/system identity
set name=mydnsname
/system ntp client
set enabled=yes primary-ntp=128.138.141.172
/tool graphing interface
add interface=ether1-wlan

Don’t really care my IP is out there, lol. I already get hundreds of failed brute force login attempts daily from all over the world on default ports. [Not the problem here, however]

If it needs to be removed though, please feel free to edit it or I can remove it.

If I need to give more info, let me know what y’all need. Thanks in advance for all your help.

Your src-nat / masquerade rule is too aggressive.
It source nat’s ANY packet, REGARDLESS of where it’s from or where it’s going.
Changing from masquerade to src-nat didn’t help because the problem isn’t the action, it’s the match criteria.

Add the condition out-interface = ether1-wan to this rule, and you’ll be set.

You should change it back to action=masquerade, which is going to be better because if your WAN IP changes, then masquerade will adapt to it where src-nat is a static configuration.

If you use NAT hairpin (your inside computers access the server by using its public IP on the Mikrotik) then you’ll need to add a second srcnat rule right behind it:
action=masquerade
out-interface=ether4
src-address=10.0.0.0/24

This will cause the server to see the Mikrotik’s IP if an internal host tries to use the public IP, (you have to do this to use NAT hairpin though) but any host out on the Internet will show up in your logs correctly.

Okay,

I set it to what you had suggested and I will see what happens. I really appreciate the help. Can’t believe all I had to do was set the out.interface..

I’ll post back with results once I see a client connect to it.

Again, thank you for the help! :smiley:

Yep, that indeed fixed it.

Everyone now shows from their own public IP instead of mine.

Thanks! :sunglasses: