Linux command
ipsec 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Start IPsec service
sudo ipsec start
Stop IPsec service
sudo ipsec stop
Check status
sudo ipsec status
Show all connections
sudo ipsec statusall
Reload configuration
sudo ipsec reload
Start specific connection
sudo ipsec up [connection]
Stop specific connection
sudo ipsec down [connection]
Show version information
ipsec --version
Reload secrets
sudo ipsec rereadsecrets
说明
ipsec is the control interface for strongSwan/Libreswan IPsec VPN implementations. It manages IKE (Internet Key Exchange) connections for encrypted network tunnels. IPsec provides network-layer encryption for VPNs, supporting site-to-site tunnels and remote access. Configuration is typically in /etc/ipsec.conf and /etc/ipsec.secrets.
参数
- start
- Start IPsec daemon.
- stop
- Stop IPsec daemon.
- restart
- Restart daemon.
- status
- Show active connections.
- statusall
- Show detailed status.
- reload
- Reload configuration.
- up _connection_
- Start connection.
- down _connection_
- Stop connection.
- update
- Apply config changes without full restart.
- route _connection_
- Install kernel IPsec policy for a connection.
- unroute _connection_
- Remove kernel IPsec policy for a connection.
- rereadsecrets
- Reload secrets from ipsec.secrets.
- listalgs
- List supported cryptographic algorithms.
- listcerts
- List certificates.
- listcacerts
- List CA certificates.
- listall
- List all information.
- rereadall
- Execute all reread operations.
- --version
- Show version information.
FAQ
What is the ipsec command used for?
ipsec is the control interface for strongSwan/Libreswan IPsec VPN implementations. It manages IKE (Internet Key Exchange) connections for encrypted network tunnels. IPsec provides network-layer encryption for VPNs, supporting site-to-site tunnels and remote access. Configuration is typically in /etc/ipsec.conf and /etc/ipsec.secrets.
How do I run a basic ipsec example?
Run `sudo ipsec start` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does start do in ipsec?
Start IPsec daemon.