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-127306

jacktrades's questions

Martin Hope
jacktrades
Asked: 2014-10-16 12:45:01 +0800 CST

带有克隆数据包的 UDP 代理

  • 2

定期从动态公共 IP 向公共 IP X:20000 发送 UDP 消息。

需要一个在 IP X:20000 中侦听的代理,然后将复制/克隆数据包转发到 X:20001 和位于 IP Y:20000 的另一台机器。现在,当应用程序在 X:20001 上侦听时,响应到 X:20001 的消息,我希望将该消息从 X:20000 转发回 PC A。

如何在 Linux 中实现此功能?(试图避免自定义脚本)


试图让一个无头服务器中的一个应用程序响应消息,并让一台带有监视器的计算机在需要时实时调试消息。

linux
  • 1 个回答
  • 3119 Views
Martin Hope
jacktrades
Asked: 2014-06-19 08:27:35 +0800 CST

Cisco 路由器上的端口转发

  • 0

我是 Cisco 新手,拥有 1841,有两个以太网接口:

interface FastEthernet0/0: Internal
Desired destination IP: 186.67.181.140

interface FastEthernet0/1: External World
 IP 186.67.181.140

想做一个从外部世界到内部 IP 的 HTTP 端口转发。

尝试添加此规则,但不进行转发:

ip nat inside source static tcp 192.168.1.20 80 186.67.181.140 80 extendable

知道为什么我没有正确进行端口转发吗?

完整配置:

interface FastEthernet0/0
 ip address 192.168.0.1 255.255.255.0 secondary
 ip address 192.168.1.1 255.255.255.0
 ip nat inside
 ip virtual-reassembly
 duplex auto
 speed auto
!         
interface FastEthernet0/1
 ip address 186.67.181.140 255.255.255.248
 ip nat outside
 ip virtual-reassembly
 duplex auto
 speed auto
!         
ip classless
ip route 0.0.0.0 0.0.0.0 186.67.181.141
no ip http server
no ip http secure-server
ip nat inside source list 100 interface FastEthernet0/1 overload
ip nat inside source static tcp 192.168.1.20 80 186.67.181.140 80 extendable
!         
!         
access-list 100 permit ip any any
access-list 111 permit ip 192.168.1.0 0.0.0.255 any
access-list 111 permit ip 192.168.0.0 0.0.0.255 any
cisco
  • 1 个回答
  • 15602 Views
Martin Hope
jacktrades
Asked: 2013-09-28 13:26:00 +0800 CST

Nagios Core 到 Nagios Core 通信

  • 1

有 2 个带有 Nagios Core 的 linux 盒子,我知道一种沟通方式是使用 NSCA 插件并在其中一个中安装客户端插件,在另一个中安装服务器插件。

也许有一种更简单的方法,比如从/主配置,而不使用 NSCA 插件。

你能描述实现这一目标的可能方法吗?

实际情况是我们有 1 台主机使用 GPRS,所以它的 IP 是动态的,所以我们需要将监控信息发送到静态 IP Nagios 服务器。

nagios
  • 2 个回答
  • 901 Views
Martin Hope
jacktrades
Asked: 2013-01-30 07:17:27 +0800 CST

无法与 Samba 共享文件

  • 0

在我的本地 LAN 中,尝试将文件夹从我的 Linux 服务器共享到 Windows PC。

Samba 守护进程正在监听:

Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      2707/smbd           
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      2707/smbd          

Samba 看起来配置良好:

[root@localhost samba]# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[Downloads]"
Processing section "[homes]"
Processing section "[printers]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
    server string = My Lil Linux Box
    smb passwd file = /etc/samba/smbpasswd
    log file = /var/log/samba/%m.log
    socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
    idmap config * : backend = tdb
    hosts allow = 192.168., 127.

[Downloads]
    comment = Downloads
    path = /home/samba
    read only = No
    guest ok = Yes

[homes]
    comment = My Home Directory
    read only = No
    guest ok = Yes

[printers]
    path = /var/spool/samba
    read only = No
    guest ok = Yes
    printable = Yes
    print ok = Yes
    browseable = No

防火墙为 Samba 和 Samba 客户端添加了例外。还暂时禁用了 SELinux。

尽管如此,Windows PC 无法发现该服务器,但服务器实际响应 ping。

知道为什么我无法访问 Linux 服务器吗?

samba
  • 1 个回答
  • 96 Views
Martin Hope
jacktrades
Asked: 2012-09-08 07:42:49 +0800 CST

无法打开显示 - X11 转发 - Cent OS

  • 16

尝试X11通过 SSH Putty/Xming(在选项上启用 X11 转发)访问我的 CentOS 6 x32 小型 Linode VPS。

我的 Windows 机器不是问题,因为它可以与其他 CentOS 服务器一起使用。

X11Forwarding 已启用/etc/ssh/sshd_config,但我仍然无法获得 X11 转发。

我正试图开始xclock工作,但Can't open display :0.0出现错误。

我也尝试过使用不同的 $DISPLAY 值,例如:0或:10.0

我试过 MobaXterm,连接时收到此消息:

X11 forwarding request failed on channel 0
centos
  • 2 个回答
  • 112468 Views
Martin Hope
jacktrades
Asked: 2012-08-22 10:21:48 +0800 CST

在 CentOS 6 上安装 Java EE 6

  • 1

在 CentOS 6 x32 中安装 Java EE 6 时遇到问题。

我已经删除了所有以前版本的 Java,并临时安装了 jdk1.6.0_34。

所以我的 $PATH 变量转到:

/usr/lib/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/opt/jdk1 .6.0_34/斌/

一切似乎都可以运行:

[root@localhost opt]# ./java_ee_sdk-6u4-jdk7-linux.sh

但它吐出以下错误:

Extracting the installer archive...
java.util.zip.ZipException: invalid entry size (expected 3807229 but got 66969 bytes)
        at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:386)
        at java.util.zip.ZipInputStream.read(ZipInputStream.java:156)
        at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:100)
        at sun.tools.jar.Main.extractFile(Main.java:934)
        at sun.tools.jar.Main.extract(Main.java:850)
        at sun.tools.jar.Main.run(Main.java:240)
        at sun.tools.jar.Main.main(Main.java:1147)
Extracting the installer runtime...
java.io.EOFException: Unexpected end of ZLIB input stream
        at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:223)
        at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:141)
        at java.util.zip.ZipInputStream.read(ZipInputStream.java:154)
        at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:100)
        at sun.tools.jar.Main.extractFile(Main.java:934)
        at sun.tools.jar.Main.extract(Main.java:850)
        at sun.tools.jar.Main.run(Main.java:240)
        at sun.tools.jar.Main.main(Main.java:1147)
Extracting the installer resources...
java.io.FileNotFoundException: ./Product/Packages/Resources.zip (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:120)
        at java.io.FileInputStream.<init>(FileInputStream.java:79)
        at sun.tools.jar.Main.run(Main.java:236)
        at sun.tools.jar.Main.main(Main.java:1147)
Extracting the installer metadata...
java.io.FileNotFoundException: ./Product/Packages/metadata.zip (No such file or directory)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:120)
        at java.io.FileInputStream.<init>(FileInputStream.java:79)
        at sun.tools.jar.Main.run(Main.java:236)
        at sun.tools.jar.Main.main(Main.java:1147)
chmod: cannot access `product-installer.sh': No such file or directory
sh: product-installer.sh: No such file or directory

校验和:

[root@localhost opt]# md5sum java_ee_sdk-6u4-jdk7-linux.sh
9299039e3daefff779875721ec8288c3  java_ee_sdk-6u4-jdk7-linux.sh

原因是 WinSCP 的错误(从我的 Windows PC 转移到 Linux),转移了许多文件并更改了校验和...

更改为 Filezilla 并且校验和匹配。

linux
  • 3 个回答
  • 1715 Views
Martin Hope
jacktrades
Asked: 2012-07-11 09:57:37 +0800 CST

Apache 重写 - 重定向到 example.com// 而不是 example.com [重复]

  • 0
这个问题在这里已经有了答案:
在 Apache 中重定向、更改 URL 或将 HTTP 重定向到 HTTPS - 你想知道的关于 mod_rewrite 规则但不敢问的一切 (5 个答案)
8 年前关闭。

尝试从以下位置重定向 apache 中的 URL 时:

www.example.com

至

example.com

它重定向到

example.com//

这是一个单页网络服务器,固定 IP 直接进入该页面。

直接在 httpd.conf 上编辑

知道为什么会这样吗?

RewriteEngine On
RewriteCond %{HTTP_HOST}  ^www.example.com [nocase]
RewriteRule ^(.*)         http://example.com/$1 [last,redirect=301]
apache-2.2 redirect mod-rewrite 301-redirect
  • 3 个回答
  • 530 Views
Martin Hope
jacktrades
Asked: 2012-07-06 14:35:25 +0800 CST

Apache 提供 CSS 和 JS 文件,但浏览器不呈现它们

  • 11

网页由 apache2、CentOS 6.2 托管。

它获取客户端的 HTML、CSS、JS 文件。但是 CSS 和 JS 不渲染,会发生什么?因为他们应该在客户端运行 100%...

apache-2.2 mime
  • 1 个回答
  • 40660 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