zoukankan      html  css  js  c++  java
  • remote connect openshift mysql

    再虚拟机内 rhc port-forward <app-name>

    此时,可以在本机 访问 127.0.0.1:8080  登陆 网页, 3306连接sql

    https://unix.stackexchange.com/questions/111433/iptables-redirect-outside-requests-to-127-0-0-1

    https://serverfault.com/questions/551361/redirect-incoming-packets-to-loopback/702685

    按上述将

    sysctl -w net.ipv4.conf.eth0.route_localnet=1


    然后
    http://forums.justlinux.com/showthread.php?136144-SOLVED-hosts-file-redirecting-a-outgoing-ip-address-to-localhost


    sudo iptables -t nat -A PREROUTING -d 192.168.252.30 -j DNAT --to-destination 127.0.0.1

    sudo iptables -t nat -A OUTPUT -d 192.168.252.130 -j DNAT --to-destination 127.0.0.1

    发现  可以在虚拟机内  用  虚拟机的eth0 的ip 地址:8080  访问了,,但主机上仍然不行    http://192.168.252.130:8080/

    尝试 

    http://www.linuxidc.com/Linux/2012-06/63520.htm

    iptables -t nat -A PREROUTING -p tcp --dport 8080 -j DNAT --to-destination 127.0.0.1:8080

  • 相关阅读:
    交流课件
    ARC127F ±AB
    CF1566F xor-quiz
    JOISC 2016 Day 1 棋盘游戏
    dev分支和release是什么
    drf 笔记
    drf 序列化的写法 总结
    Linux系统编程
    C/C++ 网络编程
    C++提高编程
  • 原文地址:https://www.cnblogs.com/crazytao/p/7231641.html
Copyright © 2011-2022 走看看