Page 1 of 1

Hotspot with public nat to nat translation working example

Posted: Mon Aug 18, 2014 10:47 am
by icanet
Dear Board,

it's my first time I try to use public IP address for my hotspot users with nat to nat translation. But I didn't could get it work even with 5.26 or 6.18. Maybe I'm blind but I haven't found any instruction for nat to nat in hotspot environments. A hint would be great.

My problem:

After putting in my credentials into the authentication page, the redirect isn't working. In /ip hotspot active I see my session with the correct public IP, but thats all.

To clearify: This config snippet is from a RB 751 with default config, e.g. 192.168.88.1 on bridge-local. I also put in my public IP space, to point out every detail.

ros code

/ip hotspot profile
add dns-name=access.mlua.de hotspot-address=192.168.88.1 html-directory=\
    hotspot http-cookie-lifetime=1d http-proxy=0.0.0.0:0 login-by=\
    cookie,http-chap name=hsprof1 rate-limit="" smtp-server=0.0.0.0 \
    split-user-domain=no use-radius=no
/ip hotspot
add disabled=no idle-timeout=5m interface=bridge-local keepalive-timeout=none \
    name=hotspot1 profile=hsprof1
/ip pool
add name=dhcp_pool1 ranges=192.168.88.2-192.168.88.254
add name=dhcp-nat ranges=213.178.191.172,213.178.191.173
/ip dhcp-server
add address-pool=dhcp_pool1 authoritative=after-2sec-delay bootp-support=\
    static disabled=no interface=bridge-local lease-time=1d name=dhcp1
/ip hotspot user profile
set [ find default=yes ] address-pool=dhcp-nat idle-timeout=none \
    keepalive-timeout=2m name=default shared-users=1 status-autorefresh=1m \
    transparent-proxy=no
/interface bridge port
add bridge=bridge-local disabled=no edge=auto external-fdb=auto horizon=none \
    interface=ether2-master-local path-cost=10 point-to-point=auto priority=\
    0x80
/ip address
add address=192.168.88.1/24 comment="default configuration" disabled=no \
    interface=bridge-local network=192.168.88.0
add address=213.178.191.171/28 disabled=no interface=ether1-gateway network=\
    213.178.191.160
/ip dhcp-server network
add address=192.168.88.0/24 dhcp-option="" dns-server=192.168.88.1 gateway=\
    192.168.88.1 netmask=32 ntp-server="" wins-server=""
/ip firewall nat
add action=masquerade chain=srcnat comment="masquerade hotspot network" \
    disabled=yes src-address=192.168.88.0/24
/ip dns
set allow-remote-requests=yes cache-max-ttl=1w cache-size=2048KiB \
    max-udp-packet-size=4096 servers=213.178.191.166
/ip route
add disabled=no distance=1 dst-address=0.0.0.0/0 gateway=213.178.191.161 \
    scope=30 target-scope=10
What is wrong? Where is my mistake? Attached you will find the hole config.

Thanks!