AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-55397

Quandary's questions

Martin Hope
Quandary
Asked: 2018-05-31 08:17:20 +0800 CST

如何 DNAT 将 Windows 10 上的所有 IP 流量从 IP1 转发到 IP2?

  • 0

在我的本地机器上,我想设置一个(网络)服务器来接收(通过 http/https)发送到 IP 65.55.44.109(vortex.data.micorosoft.com)的数据。

为此,我需要将所有 IP 流量转发65.55.44.109到127.0.0.1我的机器上,以便我可以创建 hosts-file-entry

65.55.44.109  somedomain.com  

然后在该机器上打开浏览器并输入http://somedomain.com 并从位于 127.0.0.1 的网络服务器获取网页。
当然,这仅适用于具有主机文件条目的机器(我的机器)。

在 Linux 上,我可以这样做

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

(需要在重启时重新添加)

在 Windows 上,我无法弄清楚如何做到这一点。我遇到的最接近的事情是

netsh interface portproxy add v4tov4 listenaddress=65.55.44.109 listenport=80 connectaddress=127.0.0.1 connectport=80

但这不起作用,我不知道为什么。

有什么我做错了吗?或者还有什么我可以做的吗?

我也读过这个:
http
://www.itprotoday.com/virtualization/nat-forwarding-switch-windows-10-and-windows-server-2016 所以我认为以下可能有效

Add-NetNatStaticMapping -NatName NATnetwork -Protocol TCP -ExternalIPAddress 65.55.44.109 -InternalIPAddress 127.0.0.1 -InternalPort 80 -ExternalPort 80

但我只收到一个错误(无效的类名),无法通过谷歌找到更多信息。

这可以在 Windows (Windows 10) 上以某种方式完成吗?

注意:只转发 80 端口就足够了,但所有端口都会更好。不能在主机上创建 IP 65.55.44.109
的 环回或非环回接口。
它必须绝对通过DNAT-only完成。
主机没有 IP 65.55.44.109 的网络接口,只有 192.168.xx
只是将主机文件设置为

127.0.0.1  somedomain.com  

也是不够的,因为任何对 somedomain.com 的 dns-address-resolution 的调用都会产生 IP 127.0.0.1 而不是 65.55.44.109

windows
  • 1 个回答
  • 3461 Views
Martin Hope
Quandary
Asked: 2014-09-23 07:36:38 +0800 CST

为什么 google-site-verification 进入 fastcgi-pass ?

  • 0

请参阅下面的 nginx 配置文件。
基于虚拟名称的托管 (example.com),将 example.com 和 www.example com 的请求传递给端口 9000 (127.0.0.1:9000) 上的单声道 fastcgi-process

我添加了文件 google-site-verification,但是问题是,asp.net fastcgi-application 是一个 MVC 应用程序,所以它没有找到名为“google79af7e588a34905e0.html”的控制器。

我正在尝试覆盖虚拟主机配置文件中的位置,因此它不会将 google79af7e588a34905e0.html 的请求转发到 fastcgi 应用程序,但它不起作用。

我已经重新启动了 nginx,但它没有任何区别......
我做错了什么?我尝试删除“location = /”中的等号,但这不起作用,我尝试在主要位置之前移动位置覆盖,但这也没有什么区别。我也前后更改了主机名,只是为了看看我是否在正确的配置文件中,而且当我更改域名时,我开始得到 404。

##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##


 server {
         listen   80;
         server_name www.example.com example.com;
         access_log   /var/log/nginx/your.domain1.xyz.access.log;




         location / {
                 root /home/example/www/homepage;
                 #index index.html index.htm default.aspx Default.aspx;
                 #fastcgi_index Default.aspx;
                 fastcgi_pass 127.0.0.1:9000;
                 include /etc/nginx/fastcgi_params;
         }



    #http://serverfault.com/questions/477103/how-do-i-verify-site-ownership-on-google-webmaster-tools-through-nginx-conf
    location = /google79af7e588a34905e0.html {
            rewrite ^/(.*)  $1;
            return 200 "google-site-verification: $uri";
    }




    location /doc {
        root /usr/share;
        autoindex on;
        allow 127.0.0.1;
        deny all;
    }

    location /shared_images {
        root /usr/share;
        autoindex off;
    }

    error_page 404 /CustomErrors/404.htm;

    # redirect server error pages to the static page /50x.html
    #
    #error_page 500 502 503 504 /50x.html;
    #location = /50x.html {
    #   root /usr/share/nginx/www;
    #}

}
nginx
  • 2 个回答
  • 1078 Views
Martin Hope
Quandary
Asked: 2014-02-28 00:28:00 +0800 CST

configSource 文件“connections.config”也用于父级,这是不允许的。

  • 9

问题:

我面临以下情况:

部署在机器“vmsomething”上的 ASP.NET .NET 4.0 Web 应用程序。

在 IIS 7.5 上运行的 Web 应用程序位于 vmsomething 上的 d:\webs\myapplication 中。

应用程序的配置文件:

连接配置

<?xml version="1.0"?>
<connectionStrings>
  <remove name="server"/>
  <add name="server" connectionString="Data Source=OUR_DB_Server;Initial Catalog=MY_INITIAL_CATALOG;Persist Security Info=False;User Id=OUR_DB_User;Password=OUR_TOP_SECRET_PASSWORD;MultipleActiveResultSets=False;Packet Size=4096;Application Name=&quot;MyApplication&quot;" providerName="System.Data.SqlClient"/>
</connectionStrings>

网络配置:

<?xml version="1.0"?>
<configuration>

  <connectionStrings configSource="connections.config"/>

  <system.web>
    <roleManager enabled="true" defaultProvider="AspNetWindowsTokenRoleProvider"/>
    <compilation strict="true" explicit="true">
      <assemblies>
        <add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        <add assembly="Microsoft.JScript, Version=8.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
      </assemblies>
    </compilation>
    <authentication mode="Windows"/>
    <pages>
      <namespaces>
        <clear/>
        <add namespace="System"/>
      </namespaces>
    </pages>
    <customErrors mode="Off">
      <error statusCode="404" redirect="~/w8/index.html"/>
    </customErrors>
    <globalization uiCulture="de" culture="de-CH" requestEncoding="UTF-8" responseEncoding="UTF-8"/>
    <httpRuntime maxRequestLength="2048000" executionTimeout="86400"/>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
  </system.webServer>
</configuration>

然后可以通过两种方式访问​​应用程序:
方法一:http: //vmsomething.com
方法二: http: //vmsomething.com/my_application_virtdir
(没有.com,无法添加本地链接)

现在我可以在http://vmsomething.com上打开应用程序了。
如果我尝试在http://vmsomething.com/my_application_virtdir打开应用程序,我会收到以下错误:

配置错误

我不是服务器的管理员,也不知道他是怎么配置的。
现在我的问题:

  • 是什么导致了这个错误?
  • 如何解决?
iis
  • 1 个回答
  • 14378 Views
Martin Hope
Quandary
Asked: 2010-03-24 04:17:33 +0800 CST

Linux:不区分大小写的文件系统

  • 14

有什么方法可以使 Linux 文件系统 case-INSENSITIVE ?

我在 Windows 上开发了 asp.net 应用程序,但是在将它放在 Linux 上时,mono 上的大小写/拼写总是存在问题。

一种方法是将 localhost SMB 共享挂载到 /var/www。还有其他人吗?

linux filesystems mono case-insensitive
  • 5 个回答
  • 15975 Views
Martin Hope
Quandary
Asked: 2010-03-14 12:39:01 +0800 CST

Mono:子文件夹中的 web.config 时应用程序未运行

  • 0

我在 Mono 上运行 ASP.NET。

我想运行blogengine: http:
//www.dotnetblogengine.net/

我下载了,把它放进去/var/www/blogengine,在控制台上去/var/www/blogengine启动xsp2。

我去了http://localhost:8080,它运行没有问题。

然后我停止了xsp2,去/var/www启动了xsp2。

我去了http://localhost:8080/blogengine

它以一个奇怪的错误结束:

该部分无法在此配置文件中定义(允许的定义上下文为“MachineToApplication”)。(/var/www/blogengine/Web.Config 第 9 行)

问题似乎是,只要 xsp2 根文件夹不是应用程序根文件夹,它就会停止工作......

我需要配置什么吗?或者还有什么问题?

linux asp.net mono xsp2
  • 1 个回答
  • 1047 Views
Martin Hope
Quandary
Asked: 2010-03-06 08:23:38 +0800 CST

适用于 Windows 的 SSHFS 服务器?

  • 2

是否有用于 MS-WINDOWS 的 sshfs SERVER?

我有一个可用的 sshfs 客户端(dokan Win64),但我无法通过 Internet 共享 Windows 驱动器。

windows web-server sshfs
  • 2 个回答
  • 4003 Views
Martin Hope
Quandary
Asked: 2010-03-03 04:03:05 +0800 CST

Linux 上的 ASP.NET/单声道性能

  • 0

有人知道 Linux 上的 asp.net/mono 性能如何吗?

我的意思是,哪个服务器为您提供最佳性能/交付时间(Apache/Apache2、xsp2、lighthttp、nginx 等)?
由于所有的 asp.net 都通过 xsp2,我会说 xsp2 肯定是最快的,但它可能缺少 lighthttp 提供的许多功能(例如 mod_dosevasive、URL 重写等)。

apache-2.2 asp.net mono
  • 2 个回答
  • 1105 Views
Martin Hope
Quandary
Asked: 2010-02-28 01:19:55 +0800 CST

Windows防火墙IP禁令?

  • 7

好的,问题:我有一个 IIS 网络服务器和 Windows 防火墙。为了允许到 IIS 的传入连接,我启用了端口 80 和 8080。

但是现在,如何使用 windows 防火墙阻止端口 80 (=ban) 上的特定 IP 地址/范围?

firewall iis windows-firewall ip-banning
  • 1 个回答
  • 7019 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve