Задать вопрос
  • Ubuntu server "теряет" ip при перезагрузке роутера?

    @Hu3yP7 Автор вопроса
    Valentin Barbolin, hint000, проблема была в отсутствии статичной записи в ARP, добавил и всё нормально стало работать.
    Написано
  • Ubuntu server "теряет" ip при перезагрузке роутера?

    @Hu3yP7 Автор вопроса
    Valentin Barbolin, вот:


    # Generated by iptables-save v1.8.10 (nf_tables) on Sat Aug 10 19:36:05 2024
    *filter
    :INPUT ACCEPT [0:0]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    :DOCKER - [0:0]
    :DOCKER-ISOLATION-STAGE-1 - [0:0]
    :DOCKER-ISOLATION-STAGE-2 - [0:0]
    :DOCKER-USER - [0:0]
    -A FORWARD -j DOCKER-USER
    -A FORWARD -j DOCKER-ISOLATION-STAGE-1
    -A FORWARD -o docker0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
    -A FORWARD -o docker0 -j DOCKER
    -A FORWARD -i docker0 ! -o docker0 -j ACCEPT
    -A FORWARD -i docker0 -o docker0 -j ACCEPT
    -A FORWARD -o br-91dc4662b11e -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
    -A FORWARD -o br-91dc4662b11e -j DOCKER
    -A FORWARD -i br-91dc4662b11e ! -o br-91dc4662b11e -j ACCEPT
    -A FORWARD -i br-91dc4662b11e -o br-91dc4662b11e -j ACCEPT
    -A DOCKER -d 172.18.0.3/32 ! -i br-91dc4662b11e -o br-91dc4662b11e -p tcp -m tcp --dport 80 -j ACCEPT
    -A DOCKER -d 172.18.0.3/32 ! -i br-91dc4662b11e -o br-91dc4662b11e -p tcp -m tcp --dport 81 -j ACCEPT
    -A DOCKER -d 172.18.0.3/32 ! -i br-91dc4662b11e -o br-91dc4662b11e -p tcp -m tcp --dport 443 -j ACCEPT
    -A DOCKER -d 172.17.0.2/32 ! -i docker0 -o docker0 -p tcp -m tcp --dport 8081 -j ACCEPT
    -A DOCKER-ISOLATION-STAGE-1 -i docker0 ! -o docker0 -j DOCKER-ISOLATION-STAGE-2
    -A DOCKER-ISOLATION-STAGE-1 -i br-91dc4662b11e ! -o br-91dc4662b11e -j DOCKER-ISOLATION-STAGE-2
    -A DOCKER-ISOLATION-STAGE-1 -j RETURN
    -A DOCKER-ISOLATION-STAGE-2 -o docker0 -j DROP
    -A DOCKER-ISOLATION-STAGE-2 -o br-91dc4662b11e -j DROP
    -A DOCKER-ISOLATION-STAGE-2 -j RETURN
    -A DOCKER-USER -j RETURN
    COMMIT
    # Completed on Sat Aug 10 19:36:05 2024
    # Generated by iptables-save v1.8.10 (nf_tables) on Sat Aug 10 19:36:05 2024
    *nat
    :PREROUTING ACCEPT [40743:3353687]
    :INPUT ACCEPT [0:0]
    :OUTPUT ACCEPT [33839:2843700]
    :POSTROUTING ACCEPT [33865:2845060]
    :DOCKER - [0:0]
    -A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER
    -A OUTPUT ! -d 127.0.0.0/8 -m addrtype --dst-type LOCAL -j DOCKER
    -A POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE
    -A POSTROUTING -s 172.18.0.0/16 ! -o br-91dc4662b11e -j MASQUERADE
    -A POSTROUTING -s 172.18.0.3/32 -d 172.18.0.3/32 -p tcp -m tcp --dport 80 -j MASQUERADE
    -A POSTROUTING -s 172.18.0.3/32 -d 172.18.0.3/32 -p tcp -m tcp --dport 81 -j MASQUERADE
    -A POSTROUTING -s 172.18.0.3/32 -d 172.18.0.3/32 -p tcp -m tcp --dport 443 -j MASQUERADE
    -A POSTROUTING -s 172.17.0.2/32 -d 172.17.0.2/32 -p tcp -m tcp --dport 8081 -j MASQUERADE
    -A DOCKER -i docker0 -j RETURN
    -A DOCKER -i br-91dc4662b11e -j RETURN
    -A DOCKER ! -i br-91dc4662b11e -p tcp -m tcp --dport 80 -j DNAT --to-destination 172.18.0.3:80
    -A DOCKER ! -i br-91dc4662b11e -p tcp -m tcp --dport 81 -j DNAT --to-destination 172.18.0.3:81
    -A DOCKER ! -i br-91dc4662b11e -p tcp -m tcp --dport 443 -j DNAT --to-destination 172.18.0.3:443
    -A DOCKER ! -i docker0 -p tcp -m tcp --dport 2000 -j DNAT --to-destination 172.17.0.2:8081
    COMMIT
    # Completed on Sat Aug 10 19:36:05 2024
    Написано