服务器 Gind.cn

服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器

找不到iptables mport模块

我用Debian服务器replace了运行Tomato的无线路由器/防火墙,我很高兴find了番茄的iptablesconfiguration,所以我可以直接将它导入新的服务器 (我之前的问题)。 来自Tomato的iptablesconfiguration文件(底部)在Debian中失败了iptables-restore : # iptables-restore < iptables.eth0-eth1 iptables-restore v1.4.14: Couldn't load match `mport':No such file or directory Error occurred at line: 7 Try `iptables-restore -h' or 'iptables-restore –help' for more information. 有没有办法让mport进入“现代”的iptables? 或者你能帮我翻译mport到multiport吗? 使用iptables mportsearch非常粗糙,但是我最终发现有人抱怨mport不在了,而且一个多端口教程通过引用mport扩展,导致我窥探两个盒子的文件系统模块,并尝试每个“防火墙”工具Debian有一个希望神奇地来与mport 。 我承认被Tomato的用户界面所迷惑 – 我试过的每一个Debian软件包都让我越来越困惑(gui或cli)。 如果我可以让服务器简单地路由一切,我认为mason可能工作。 难怪大家都讨厌iptables。 我花了更多的时间来试图找出错误比我应该。 如果我花了那么多时间去了解iptables ,我可能已经可以将mport规则翻译成multiport 。 另外,我考虑发布给超级用户,然而,less数iptables标记的问题与我在这里读取的ServerFault中不同。 寻找模块: 我使用tomato固件进入无线路由器,在/usr/lib/iptablesfind模块libipt_mport.so 。 但在/lib/modules/2.4.20/kernel/net/ipv4/netfilter目录中,没有libipt_mport.so ,只有ipt_multiport.o 。 在Debian中(新安装的wheezy),我使用了updatedb并locate MASQ […]

将子文件夹博客永久redirect到另一台服务器上的子域

似乎这个服务器redirect问题可能比wordpress堆栈交换更适合serverfault。 最初我们在example.com上有一个静态营销网站,在www.joesexample.com/blog上有wordpress博客。 我们现在将该博客移至blog.joesexample.com。 然而,这个博客是托pipe在不同的服务器(相同的服务器名称,但不同的WP特定的主机)。 原来的营销网站仍然在原来的其他服务器上。 所以大概在www.joesexample.com/blog的原始主机上,我们将清空该文件夹并添加一个需要redirect301的.htaccess,以便任何人进入joesexample.com/blog将被永久redirect到blog.joesexample.com。以及将所有postredirect到新的位置。 例如,将www.joesexample.com/blog/2014/01/my-post-title/redirect到blog.joesexample.com/2014/01/my-post-title/ 基于谷歌的结果将做以下工作: RewriteEngine ON RewriteCond %{REQUEST_URI} ^/blog RewriteRule ^(.*)$ http://blog.joesexample.com/$1 [R=301,L,P] 不知道,因为他们是在不同的服务器(ips),如果这很重要,我想这不会因为域名是相同的,如果该规则将只覆盖主博客主页redirect或所有职位,我不知道它是否会redirect以年/月/post标题格式的post。 最后,我之所以先问这里,而不是简单地自己testing,是因为它是另一个人访问这个特定的服务器,所以我想相当有信心,它会在我有他们尝试之前工作。 更新 – 走在前面,并试图让人使用上面的htaccess。 这一切似乎工作,除非它不重写URL字段中的url。 我的意思是,如果我去http://www.joesexample.com/blog ,现在正确显示来自http://blog.joesexample.com的内容,但是URL字段仍显示http://www.joesexample。 com / blog 。 所以这听起来像我仍然需要一个额外的htaccess规则,将改变URL栏中的URL外观。 有什么想法吗?