Code Monkey home page Code Monkey logo

Comments (4)

hwdsl2 avatar hwdsl2 commented on May 8, 2024

@Auston 应该可以的。请提供以下命令的输出。可隐去IP:

sudo iptables -nvL
sudo iptables -nvL -t nat
sudo netstat -anput

from setup-ipsec-vpn.

paul-sama avatar paul-sama commented on May 8, 2024

抱歉,已经卸载了,重新装了PPTP

from setup-ipsec-vpn.

hwdsl2 avatar hwdsl2 commented on May 8, 2024

@Auston 好的!如果需要可以再留言。

from setup-ipsec-vpn.

yangchengwork avatar yangchengwork commented on May 8, 2024

我也碰到同样的问题,现将这部分的信息附后。其中3388端口是我使用的ss端口,在没有安装L2TP前确认可以使用

$ sudo iptables -nvL
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
10 560 fail2ban-ssh tcp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 22
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
18 1115 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
0 0 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
0 0 REJECT all -- * * 0.0.0.0/0 127.0.0.0/8 reject-with icmp-port-unreachable
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp spts:67:68 dpts:67:68
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 multiport dports 500,4500
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:1701 policy match dir in pol ipsec
0 0 DROP udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:1701
12 608 DROP all -- * * 0.0.0.0/0 0.0.0.0/0

Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
0 0 ACCEPT all -- eth+ ppp+ 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
0 0 ACCEPT all -- ppp+ eth+ 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT all -- ppp+ ppp+ 192.168.42.0/24 192.168.42.0/24
0 0 ACCEPT all -- eth+ * 0.0.0.0/0 192.168.43.0/24 ctstate RELATED,ESTABLISHED
0 0 ACCEPT all -- * eth+ 192.168.43.0/24 0.0.0.0/0
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0

Chain OUTPUT (policy ACCEPT 6 packets, 674 bytes)
pkts bytes target prot opt in out source destination

Chain fail2ban-ssh (1 references)
pkts bytes target prot opt in out source destination
0 0 REJECT all -- * * 61.51.18.101 0.0.0.0/0 reject-with icmp-port-unreachable
10 560 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0

$ sudo iptables -nvL -t nat
Chain PREROUTING (policy ACCEPT 44 packets, 2232 bytes)
pkts bytes target prot opt in out source destination

Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 2 packets, 178 bytes)
pkts bytes target prot opt in out source destination

Chain POSTROUTING (policy ACCEPT 2 packets, 178 bytes)
pkts bytes target prot opt in out source destination
0 0 SNAT all -- * eth+ 192.168.42.0/24 0.0.0.0/0 to:XX.XX.XX.XX
0 0 SNAT all -- * eth+ 192.168.43.0/24 0.0.0.0/0 policy match dir out pol none to:XX.XX.XX.XX

$ sudo netstat -anput
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 978/sshd
tcp 0 0 XX.XX.XX.XX:3388 0.0.0.0:* LISTEN 1583/python
tcp 0 332 XX.XX.XX.XX:22 211.162.33.131:28595 ESTABLISHED 1702/sshd: ubuntu [
tcp6 0 0 :::22 :::* LISTEN 978/sshd
udp 0 0 127.0.0.1:4500 0.0.0.0:* 7749/pluto
udp 0 0 XX.XX.XX.XX:4500 0.0.0.0:* 7749/pluto
udp 0 0 127.0.0.1:500 0.0.0.0:* 7749/pluto
udp 0 0 XX.XX.XX.XX:500 0.0.0.0:* 7749/pluto
udp 0 0 0.0.0.0:68 0.0.0.0:* 651/dhclient
udp 0 0 0.0.0.0:63124 0.0.0.0:* 651/dhclient
udp 0 0 0.0.0.0:1701 0.0.0.0:* 7767/xl2tpd
udp 0 0 XX.XX.XX.XX:3388 0.0.0.0:* 1583/python
udp6 0 0 :::61828 :::* 651/dhclient
udp6 0 0 ::1:500 :::* 7749/pluto

from setup-ipsec-vpn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.