【问题标题】:How to access Seafile server in a virtual machine through IPtables?如何通过 IPtables 访问虚拟机中的 Seafile 服务器?
【发布时间】:2014-07-23 07:43:48
【问题描述】:

我已经使用默认端口设置(800080821000112001)在Ubuntu服务器14.04上安装了Seafile-server3.0.4 64bit,但是无法通过客户端访问实例。

基础设施

Ubuntu-serverGentoo 主机上作为 KVM 机器运行。

iptables 规则

一段时间后,我将following Iptables rules 添加到主机(gentoo),这似乎符合Seafile 的要求:

#Iptables-Rules for Seafile
iptables -A INPUT -p tcp -m multiport --dports 8000,8082,10001,12001 -m state --state NEW,ESTABLISHED -j ACCEPT
iptables -A output -p tcp -m multiport --sports 8000,8082,10001,12001 -m state --state ESTABLISHED -j ACCEPT

但是,即使使用telnet,我仍然无法从 Internet 或主机连接到 seafile 服务器。

更新:问题可能与fail2ban

有关

【问题讨论】:

    标签: iptables ubuntu-server seafile-server fail2ban


    【解决方案1】:

    当我使用 NAT 将我的虚拟机链接到我的主机时,我必须编辑以下规则以使其正常工作:

    #Iptables-Rules for Seafile
    iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 10001 -j DNAT --to 192.168.8.8:10001
    iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 12001 -j DNAT --to 192.168.8.8:12001
    

    参考文献

    【讨论】:

      猜你喜欢
      • 2016-08-13
      • 1970-01-01
      • 2021-11-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多