再虚拟机内 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

remote connect openshift mysql的更多相关文章

  1. 连接mysql问题 mysqlnd cannot connect to MySQL 4.1+ using old authentication

    第一篇:PHP5.3开始使用MySqlND作为默认的MySql访问驱动,而且从这个版本开始将不再支持使用旧的用户接口链接Mysql了,你可能会看到类似的提示: #2000 - mysqlnd cann ...

  2. perationalError: (2003, "Can't connect to MySQL server on u'192.168.1.6' (timed out)")

    在Ubuntu(192.168.1.20)中部署项目后,mysql还在另外一台windows(192.168.1.6)机子上,ping windows时可以ping通,但是访问项目提示: perati ...

  3. 2003-Can't connect to mysql server on localhost (10061)

    mysql数据库出现2003-Can't connect to mysql server on localhost (10061)问题 解决办法:查看wampserver服务器是否启动,如果没有启动启 ...

  4. ERROR 2003 (HY000): Can't connect to MySQL server on 'ip address' (111)的处理办法

    远程连接mysql数据库时可以使用以下指令 mysql -h 192.168.1.104 -u root -p 如果是初次安装mysql,需要将所有/etc/mysql/内的所有配置文件的bind-a ...

  5. can't connect to mysql server on 'localhost'(10061)

    在linux下安装Navicat,想说在windows下试一试phpmyadmin之外的mysql图形工具. 显示下载安装了mysql workbench,链接成功.然后又弄了一下输入法重启,想说试一 ...

  6. 解决Can't connect to MySQL server on 'localhost' (10048)

    解决Can't connect to MySQL server on 'localhost' (10048) 您使用的是Windows操作系统,此错误与一个注册表键值TcpTimedWaitDelay ...

  7. MySQL问题记录--Can't connect to MySQL server on localhost (10061)解决方法

    本文mysql的安装环境为win7 64位,mysql版本为MySQL5.7 问题描述:在命令行输入 mysql -u root -p 登录mysql,返回"Can't connect to ...

  8. ruby使用DBI连接MySQL数据库发生异常:in `error': Can't connect to MySQL server on 'localhost' (10061) (DBI::DatabaseError)

    Ruby使用DBI连接MySQL数据库一般为: require "dbi" dbh = DBI.connect("dbi:Mysql:test:localhost&quo ...

  9. mysqlnd cannot connect to MySQL 4.1+

    phpMyAdmin - error #2000 - mysqlnd cannot connect to MySQL 4.1+ using the old insecure authenticatio ...

随机推荐

  1. 【Vjudge】P558E A Simple Task(线段树暴力)

    题目链接 这题……太暴力了吧…… 开二十六棵线段树维护l到r字符i出现的次数,然后修改的时候暴力修改,输出的时候暴力输出……就过了…… 然后我还没想到…… qwq #include<cstdio ...

  2. [BZOJ2678][Usaco2012 Open]Bookshelf

    P.S. 偶然间发现可以用 markdown... [BZOJ2678][Usaco2012 Open]Bookshelf 试题描述 When Farmer John isn't milking co ...

  3. [CODEVS1915] 分配问题(最小费用最大流)

    传送门 脑残题 建图都懒得说了 ——代码 #include <queue> #include <cstdio> #include <cstring> #includ ...

  4. axis2生成webservice服务端返回String[]和String[][]一维数组和二维数组解析

    环境:用axis2生成服务端,用aixs做客户端 1:直接返回String[]: public String[] testArr(String name) { String[] ret=new Str ...

  5. linux--bash: redis-server: 未找到命令

    linux 安装redis过程中出现了异常,make不通过,异常如下: [root@localhost redis-2.8.3]# make cd src && make all ma ...

  6. pytesseract的使用

    首先,先安装好Tesseract软件,pytesseract模块 问题 1 :FileNotFoundError: [WinError 2] 系统找不到指定的文件. 加上这行代码 pytesserac ...

  7. c#.NET的事件与委托例子

    原文发布时间为:2008-07-25 -- 来源于本人的百度文章 [由搬家工具导入] using System;using System.Data;using System.Configuration ...

  8. 转 C++中不能声明为虚函数的有哪些函数

    传送门 C++中不能声明为虚函数的有哪些函数 常见的不不能声明为虚函数的有:普通函数(非成员函数):静态成员函数:内联成员函数:构造函数:友元函数. 1.为什么C++不支持普通函数为虚函数? 普通函数 ...

  9. py2exe使用方法 (含一些调试技巧,如压缩email 类)

    http://justcoding.iteye.com/blog/900993 一.简介 py2exe是一个将python脚本转换成windows上的可独立执行的可执行程序(*.exe)的工具,这样, ...

  10. dedecms--二次开发之会员帐号过期无法登录

    最近在二次开发织梦系统的会员功能:要求会员帐号有期限,开始时间以会员添加时间为开始,这样登录的时候需要判断帐号是否过期,原本的织梦系统中是通过$rs = $cfg_ml->CheckUser($ ...