thắc mắc Nat Port Viettel trên EdgeRouterX

  • Người tạo chủ đề Người tạo chủ đề amoniac06
  • Ngày bắt đầu Ngày bắt đầu

amoniac06

Senior Member
Xin chào các bác, em mới mua con EdgeRouterX để chạy dual Wan (Viettel và VNPT).
Hiện tại thì e đã quay được PPOE cho 2 wan này được rồi, và cũng kết nối được internet ok.

1602912921599.png


Con server đang chạy port 8080 và e muốn ra ngoài internet
1602913266422.png


và em có config Port rule để cho phép port 8080 ra ngoài
1602913028995.png


1602913062088.png


1602913091024.png


Mọi thứ có vẻ ok, check trên CanYouSeeMe thì thấy port đã open ngon rồi
.... Nhưng khi e vào http://171.227.197.56:8080 thì báo lỗi không vào đc
1602913183935.png


mọi người biết vấn đề ở đây là gì không vậy, em cũng mở thử mở port SSH, check thì open nhưng connect cũng ko dc luôn ạ

Đây là config của em
Mã:
firewall {                                                                     
    all-ping enable                                                             
    broadcast-ping disable                                                     
    group {                                                                     
        network-group PRIVATE_NETS {                                           
            network 192.168.0.0/16                                             
            network 172.16.0.0/12                                               
            network 10.0.0.0/8                                                 
        }                                                                       
    }                                                                           
    ipv6-receive-redirects disable                                             
    ipv6-src-route disable                                                     
    ip-src-route disable                                                       
    log-martians disable                                                       
    modify balance {                                                           
        rule 10 {                                                               
            action modify                                                       
            description "do NOT load balance lan to lan"                       
            destination {                                                       
                group {                                                         
                    network-group PRIVATE_NETS                                 
                }                                                               
            }                                                                   
            modify {
                table main
            }
        }
        rule 20 {
            action modify
            description "do NOT load balance destination public address"
            destination {
                group {
                    address-group ADDRv4_pppoe0
                }
            }
            modify {
                table main
            }
        }
        rule 30 {
            action modify
            description "do NOT load balance destination public address"
            destination {
                group {
                    address-group ADDRv4_pppoe1
                }
            }
            modify {
                table main
            }
        }
        rule 70 {
            action modify
            modify {
                lb-group G
            }
        }
    }
    name WAN_IN {
        default-action drop
        description "WAN to internal"
        rule 10 {
            action accept
            description "Allow established/related"
            log disable
            protocol all
            state {
                established enable
                related enable
            }
        }
        rule 20 {
            action accept
            description 8080
            destination {
                port 8080
            }
            log disable
            protocol tcp
        }
        rule 30 {
            action accept
            description 223
            destination {
                port 223
            }
            log disable
            protocol tcp
        }
        rule 40 {
            action accept
            description 37777
            destination {
                port 37777
            }
            log disable
            protocol tcp
        }
        rule 50 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    name WAN_LOCAL {
        default-action drop
        description "WAN to router"
        rule 10 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }
        rule 30 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    options {
        mss-clamp {
            mss 1412
        }
    }
    receive-redirects disable
    send-redirects enable
    source-validation disable
    syn-cookies enable
}
interfaces {
    ethernet eth0 {
        description eth0
        duplex auto
        pppoe 0 {
            default-route auto
            firewall {
                in {
                    name WAN_IN
                }
                local {
                    name WAN_LOCAL
                }
            }
            mtu 1492
            name-server auto
            password ****************
            user-id **-******
        }
        speed auto
    }
    ethernet eth1 {
        description eth1
        duplex auto
        pppoe 1 {
            default-route auto
            firewall {
                in {
                    name WAN_IN
                }
                local {
                    name WAN_LOCAL
                }
            }
            mtu 1492
            name-server auto
            password ****************
            user-id ****_*****_*********
        }
        speed auto
    }
    ethernet eth2 {
        duplex auto
        speed auto
    }
    ethernet eth3 {
        duplex auto
        speed auto
    }
    ethernet eth4 {
        duplex auto
        speed auto
    }
    loopback lo {
    }
    switch switch0 {
        address 192.168.123.1/24
        description Local
        firewall {
            in {
                modify balance
            }
        }
        mtu 1500
        switch-port {
            interface eth2 {
            }
            interface eth3 {
            }
            interface eth4 {
            }
            vlan-aware disable
        }
    }
}
load-balance {
    group G {
        interface pppoe0 {
        }
        interface pppoe1 {
        }
        lb-local enable
        lb-local-metric-change disable
    }
}
port-forward {
    auto-firewall disable
    hairpin-nat disable
    wan-interface pppoe0
}
service {
    dhcp-server {
        disabled false
        hostfile-update disable
        shared-network-name LAN {
            authoritative enable
            subnet 192.168.123.0/24 {
                default-router 192.168.123.1
                dns-server 192.168.123.1
                lease 86400
                start 192.168.123.10 {
                    stop 192.168.123.240
                }
                static-mapping 5E09A97PAJB1E40 {
                    ip-address 192.168.123.241
                    mac-address a0:bd:1d:10:8f:f2
                }
                static-mapping raspberrypi {
                    ip-address 192.168.123.160
                    mac-address b8:27:eb:b7:d3:2b
                }
            }
        }
        static-arp disable
        use-dnsmasq disable
    }
    dns {
        forwarding {
            cache-size 150
            listen-on switch0
        }
    }
    gui {
        http-port 80
        https-port 443
        older-ciphers enable
    }
    nat {
        rule 1 {
            description Nginx
            destination {
                group {
                    address-group ADDRv4_pppoe1
                }
                port 8080
            }
            inbound-interface pppoe1
            inside-address {
                address 192.168.123.160
                port 8080
            }
            log enable
            protocol tcp
            type destination
        }
        rule 3 {
            description SSH
            destination {
                group {
                    address-group ADDRv4_pppoe1
                }
                port 223
            }
            inbound-interface pppoe1
            inside-address {
                address 192.168.123.160
                port 223
            }
            log disable
            protocol tcp
            type destination
        }
        rule 5000 {
            description "masquerade for WAN"
            outbound-interface pppoe0
            type masquerade
        }
        rule 5002 {
            description "masquerade for WAN 2"
            outbound-interface pppoe1
            type masquerade
        }
    }
    ssh {
        port 22
        protocol-version v2
    }
    unms {
        disable
    }
}
system {
    conntrack {
        expect-table-size 4096
        hash-size 4096
        table-size 32768
        tcp {
            half-open-connections 512
            loose enable
            max-retrans 3
        }
    }
    host-name ubnt
    login {
        user ubnt {
            authentication {
                encrypted-password ****************
            }
            level admin
        }
    }
    ntp {
        server 0.ubnt.pool.ntp.org {
        }
        server 1.ubnt.pool.ntp.org {
        }
        server 2.ubnt.pool.ntp.org {
        }
        server 3.ubnt.pool.ntp.org {
        }
    }
    syslog {
        global {
            facility all {
                level notice
            }
            facility protocols {
                level debug
            }
        }
    }
    time-zone Asia/Ho_Chi_Minh
}
 
Ra trình duyệt khác hoặc xóa cache.

Tôi vào ip:8080 của bạn thấy nó nhẩy ra trang php version đó thôi.

//

PHP Version 7.3.19-1~deb10u1​

 
Ra trình duyệt khác hoặc xóa cache.

Tôi vào ip:8080 của bạn thấy nó nhẩy ra trang php version đó thôi.

//

PHP Version 7.3.19-1~deb10u1​


Hình như có j sai sai, dùng 4G thì vào ip đó đc, nhưng vào bằng mạng nhà thì ko vào đc

Gửi từ Xiaomi MI 6 bằng vozFApp
 
Xin chào các bác, em mới mua con EdgeRouterX để chạy dual Wan (Viettel và VNPT).
Hiện tại thì e đã quay được PPOE cho 2 wan này được rồi, và cũng kết nối được internet ok.

Xem tệp đính kèm 243319

Con server đang chạy port 8080 và e muốn ra ngoài internet
Xem tệp đính kèm 243336

và em có config Port rule để cho phép port 8080 ra ngoài
Xem tệp đính kèm 243323

Xem tệp đính kèm 243326

Xem tệp đính kèm 243328

Mọi thứ có vẻ ok, check trên CanYouSeeMe thì thấy port đã open ngon rồi
.... Nhưng khi e vào http://171.227.197.56:8080 thì báo lỗi không vào đc
Xem tệp đính kèm 243333

mọi người biết vấn đề ở đây là gì không vậy, em cũng mở thử mở port SSH, check thì open nhưng connect cũng ko dc luôn ạ

Đây là config của em
Mã:
firewall {                                                                    
    all-ping enable                                                            
    broadcast-ping disable                                                    
    group {                                                                    
        network-group PRIVATE_NETS {                                          
            network 192.168.0.0/16                                            
            network 172.16.0.0/12                                              
            network 10.0.0.0/8                                                
        }                                                                      
    }                                                                          
    ipv6-receive-redirects disable                                            
    ipv6-src-route disable                                                    
    ip-src-route disable                                                      
    log-martians disable                                                      
    modify balance {                                                          
        rule 10 {                                                              
            action modify                                                      
            description "do NOT load balance lan to lan"                      
            destination {                                                      
                group {                                                        
                    network-group PRIVATE_NETS                                
                }                                                              
            }                                                                  
            modify {
                table main
            }
        }
        rule 20 {
            action modify
            description "do NOT load balance destination public address"
            destination {
                group {
                    address-group ADDRv4_pppoe0
                }
            }
            modify {
                table main
            }
        }
        rule 30 {
            action modify
            description "do NOT load balance destination public address"
            destination {
                group {
                    address-group ADDRv4_pppoe1
                }
            }
            modify {
                table main
            }
        }
        rule 70 {
            action modify
            modify {
                lb-group G
            }
        }
    }
    name WAN_IN {
        default-action drop
        description "WAN to internal"
        rule 10 {
            action accept
            description "Allow established/related"
            log disable
            protocol all
            state {
                established enable
                related enable
            }
        }
        rule 20 {
            action accept
            description 8080
            destination {
                port 8080
            }
            log disable
            protocol tcp
        }
        rule 30 {
            action accept
            description 223
            destination {
                port 223
            }
            log disable
            protocol tcp
        }
        rule 40 {
            action accept
            description 37777
            destination {
                port 37777
            }
            log disable
            protocol tcp
        }
        rule 50 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    name WAN_LOCAL {
        default-action drop
        description "WAN to router"
        rule 10 {
            action accept
            description "Allow established/related"
            state {
                established enable
                related enable
            }
        }
        rule 30 {
            action drop
            description "Drop invalid state"
            state {
                invalid enable
            }
        }
    }
    options {
        mss-clamp {
            mss 1412
        }
    }
    receive-redirects disable
    send-redirects enable
    source-validation disable
    syn-cookies enable
}
interfaces {
    ethernet eth0 {
        description eth0
        duplex auto
        pppoe 0 {
            default-route auto
            firewall {
                in {
                    name WAN_IN
                }
                local {
                    name WAN_LOCAL
                }
            }
            mtu 1492
            name-server auto
            password ****************
            user-id **-******
        }
        speed auto
    }
    ethernet eth1 {
        description eth1
        duplex auto
        pppoe 1 {
            default-route auto
            firewall {
                in {
                    name WAN_IN
                }
                local {
                    name WAN_LOCAL
                }
            }
            mtu 1492
            name-server auto
            password ****************
            user-id ****_*****_*********
        }
        speed auto
    }
    ethernet eth2 {
        duplex auto
        speed auto
    }
    ethernet eth3 {
        duplex auto
        speed auto
    }
    ethernet eth4 {
        duplex auto
        speed auto
    }
    loopback lo {
    }
    switch switch0 {
        address 192.168.123.1/24
        description Local
        firewall {
            in {
                modify balance
            }
        }
        mtu 1500
        switch-port {
            interface eth2 {
            }
            interface eth3 {
            }
            interface eth4 {
            }
            vlan-aware disable
        }
    }
}
load-balance {
    group G {
        interface pppoe0 {
        }
        interface pppoe1 {
        }
        lb-local enable
        lb-local-metric-change disable
    }
}
port-forward {
    auto-firewall disable
    hairpin-nat disable
    wan-interface pppoe0
}
service {
    dhcp-server {
        disabled false
        hostfile-update disable
        shared-network-name LAN {
            authoritative enable
            subnet 192.168.123.0/24 {
                default-router 192.168.123.1
                dns-server 192.168.123.1
                lease 86400
                start 192.168.123.10 {
                    stop 192.168.123.240
                }
                static-mapping 5E09A97PAJB1E40 {
                    ip-address 192.168.123.241
                    mac-address a0:bd:1d:10:8f:f2
                }
                static-mapping raspberrypi {
                    ip-address 192.168.123.160
                    mac-address b8:27:eb:b7:d3:2b
                }
            }
        }
        static-arp disable
        use-dnsmasq disable
    }
    dns {
        forwarding {
            cache-size 150
            listen-on switch0
        }
    }
    gui {
        http-port 80
        https-port 443
        older-ciphers enable
    }
    nat {
        rule 1 {
            description Nginx
            destination {
                group {
                    address-group ADDRv4_pppoe1
                }
                port 8080
            }
            inbound-interface pppoe1
            inside-address {
                address 192.168.123.160
                port 8080
            }
            log enable
            protocol tcp
            type destination
        }
        rule 3 {
            description SSH
            destination {
                group {
                    address-group ADDRv4_pppoe1
                }
                port 223
            }
            inbound-interface pppoe1
            inside-address {
                address 192.168.123.160
                port 223
            }
            log disable
            protocol tcp
            type destination
        }
        rule 5000 {
            description "masquerade for WAN"
            outbound-interface pppoe0
            type masquerade
        }
        rule 5002 {
            description "masquerade for WAN 2"
            outbound-interface pppoe1
            type masquerade
        }
    }
    ssh {
        port 22
        protocol-version v2
    }
    unms {
        disable
    }
}
system {
    conntrack {
        expect-table-size 4096
        hash-size 4096
        table-size 32768
        tcp {
            half-open-connections 512
            loose enable
            max-retrans 3
        }
    }
    host-name ubnt
    login {
        user ubnt {
            authentication {
                encrypted-password ****************
            }
            level admin
        }
    }
    ntp {
        server 0.ubnt.pool.ntp.org {
        }
        server 1.ubnt.pool.ntp.org {
        }
        server 2.ubnt.pool.ntp.org {
        }
        server 3.ubnt.pool.ntp.org {
        }
    }
    syslog {
        global {
            facility all {
                level notice
            }
            facility protocols {
                level debug
            }
        }
    }
    time-zone Asia/Ho_Chi_Minh
}
Dù bạn đã mở cổng mà địa chỉ nguồn bạn không chỉ định thì sao bên ngoài kết nối vào được.
 

Thống kê chủ đề

Ngày tạo
amoniac06,
Người trả lời cuối
Darias,
Trả lời
5
Lượt xem
1.149
Quay lại
Lên đầu trang