CHARON-CMD(8)
π CHARON-CMD π
okay bestie, gather round, because we're talking about charon-cmd, the little cutie from the strongSwan family (manual section 8, iykyk) β a Simple IKE client, aka your IPsec VPN client. she's giving β¨road warriorβ¨ energy and honestly? obsessed.
πΈ SYNOPSIS πΈ
charon-cmd --host hostname --identity identity [ options ]
π¦ DESCRIPTION π¦
so charon-cmd is the program that sets up your IPsec VPN connections using the Internet Key Exchange protocol β IKE, and yes she does version 1 AND version 2, versatile queen π. she supports a whole bunch of different road-warrior scenarios, so whatever your setup is, she probably ate.
Like the IKE daemon charon, charon-cmd has to be run as root (or, more specifically, as a user with the CAP_NET_ADMIN capability). no cap, that's just how it is π
.
Out of all the options below, at least --host and --identity are required. and depending on which authentication profile you picked, you'll also need to hand over credentials with their respective options. no credentials, no vibes, no connection π«Ά.
Also! Many of the charon-specific configuration options in strongswan.conf apply to charon-cmd too. For instance, if you wanna configure customized logging to stdout, this snippet right here is the move:
charon-cmd {
filelog {
stdout {
default = 1
ike = 2
cfg = 2
}
}
}
β¨ OPTIONS β¨
--helpβ prints usage information plus a short summary of all the available options. your lil cheat sheet fr.--versionβ prints the strongSwan version.--debug levelβ sets the default log level (defaults to1).levelis a number between-1and4. wanna get real granular with it? refer tostrongswan.conffor the options that let you fine-tune the logging output π .--host hostnameβ DNS name or IP address to connect to.--identity identityβ the identity the client uses for the IKE exchange.--eap-identity identityβ the identity the client uses for EAP authentication.--xauth-username usernameβ the username the client uses for XAuth authentication.--remote-identity identityβ the server identity to expect, defaults tohostname.--cert pathβ trusted certificate, either for authentication or trust chain validation. to provide more than one certificate, just use multiple--certoptions, stack 'em up π.--rsa pathβ RSA private key to use for authentication (if a password is required, it will be requested on demand). for other key types, use--privinstead.--priv pathβ private key to use for authentication (if a password is required, it will be requested on demand).--p12 pathβ PKCS#12 file with private key and certificates, to use for authentication and trust chain validation (if a password is required it will be requested on demand).--agent[=socket]β use the SSH agent for authentication. ifsocketisn't specified, it's read from theSSH_AUTH_SOCKenvironment variable π.--local-ts subnetβ an additional traffic selector to propose for our side. the requested virtual IP address will always be proposed, periodt.--remote-ts subnetβ traffic selector to propose for the remote side, defaults to0.0.0.0/0.--ike-proposal proposalβ IKE proposal to offer instead of the default. for IKEv1, a single proposal consists of one encryption algorithm, an integrity/PRF algorithm and a DH group. IKEv2 can propose multiple algorithms of the same kind. to specify multiple proposals, just repeat the option.--esp-proposal proposalβ ESP proposal to offer instead of the default. for IKEv1, a single proposal consists of one encryption algorithm, an integrity algorithm and an optional DH group for Perfect Forward Secrecy rekeying. IKEv2 can propose multiple algorithms of the same kind. to specify multiple proposals, repeat the option.--ah-proposal proposalβ AH proposal to offer instead of ESP. for IKEv1, a single proposal consists of an integrity algorithm and an optional DH group for Perfect Forward Secrecy rekeying. IKEv2 can propose multiple algorithms of the same kind. to specify multiple proposals, repeat the option.--profile nameβ the authentication profile to use. the list of supported profiles lives in the Authentication Profiles sections right below π. defaults toikev2-pubif a private key was supplied, and toikev2-eapotherwise.
π IKEv2 Authentication Profiles π
ikev2-pubβ IKEv2 with public key client and server authentication.ikev2-eapβ IKEv2 with EAP client authentication and public key server authentication.ikev2-pub-eapβ IKEv2 with public key and EAP client authentication (RFC 4739) and public key server authentication.
π§ IKEv1 Authentication Profiles π§
the following authentication profiles use either Main Mode or Aggressive Mode β the latter is denoted with a -am suffix, so you'll always know which one you're getting π
ikev1-pub,ikev1-pub-amβ IKEv1 with public key client and server authentication.ikev1-xauth,ikev1-xauth-amβ IKEv1 with public key client and server authentication, followed by client XAuth authentication.ikev1-xauth-psk,ikev1-xauth-psk-amβ IKEv1 with pre-shared key (PSK) client and server authentication, followed by client XAuth authentication. (INSECURE!) β like, genuinely, bestie, be careful with this one π.ikev1-hybrid,ikev1-hybrid-amβ IKEv1 with public key server authentication only, followed by client XAuth authentication.
β SEE ALSO β
aaaand that's the whole thing π this page is from strongSwan version 6.0.7, dated 2013-06-21 β vintage, iconic, still slaying. go set up that VPN, you've got this π«Άβ¨
π¦ where this page comes from
- fedora 43: strongswan 6.0.7-2.fc43 Β· GPL-2.0-or-later
- fedora 44: strongswan 6.0.7-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms