title: How can I open some ports on Ubuntu?
body: <p>I know a little about Linux. Today I created a <a href="https://en.wikipedia.org/wiki/Virtual_private_network" rel="noreferrer">VPN</a> server on my Ubuntu installation according to <em><a href="https://github.com/philplckthun/setup-simple-ipsec-l2tp-vpn" rel="noreferrer">Set up a simple IPsec/L2TP VPN server for Ubuntu, Arch Linux and Debian</a></em>.</p>
  <p>But when I finish the installation, I use my iPhone to connect the <a href="https://en.wikipedia.org/wiki/IPsec" rel="noreferrer">IPsec</a> VPN, bur it shows the VPN Server has no response.</p>
  <p>The GitHub document shows</p>
  <blockquote>
  <p>Ports 1701, 500 and 4500 must be opened for the VPN to work!</p>
  </blockquote>
  <p>So I have tried to open these ports on my Ubuntu server.</p>
  <p>I use the <a href="https://en.wikipedia.org/wiki/Iptables" rel="noreferrer">iptables</a> command to open these ports, but it failed. Maybe I don't known how to use this command correctly. How can I open these ports on my Ubuntu server?</p>
  <p>And if these ports have been opened successfully, can it be proved by the Windows <a href="https://en.wikipedia.org/wiki/Cmd.exe" rel="noreferrer">CMD</a> window through <a href="https://en.wikipedia.org/wiki/Telnet" rel="noreferrer">telnet</a>'ting the port?</p>