我们正在为DRtesting一个VPN服务器。 我们有一个rackspace云实例,一个运行在racoon上的纯IPSEC VPN服务器,为“战士”客户提供服务。 我们有一些NAT在服务器上进行外部路由:
-A POSTROUTING -s 172.31.31.0/24 -o eth0 -j SNAT --to-source wxyz
它工作得很好,与windows,苹果IOS和Android客户端连接完美。
我们想要做的是将服务器设置为只在VPN上托pipe几个网页,即服务器在VPN上具有IP。 我们可以使用vpnc来做到这一点,连接到公共IP,但这似乎是矫枉过正。
有没有一种方法,我们可以做到这一点,使用浣熊,或回环接口也许?
我们的(testing)浣熊conf:
path pre_shared_key "/etc/racoon/psk.txt"; remote anonymous { ph1id 1; exchange_mode aggressive,main; my_identifier user_fqdn "redacted"; peers_identifier keyid tag "blah"; dpd_delay 20; ike_frag on; nat_traversal on; passive on; initial_contact off; generate_policy unique; proposal_check claim; lifetime time 24 hour; mode_cfg on; verify_cert off; proposal { encryption_algorithm aes; hash_algorithm sha1; #hash_algorithm md5; authentication_method xauth_psk_server; dh_group 2; } } sainfo anonymous { remoteid 1; lifetime time 12 hour; encryption_algorithm aes,3des,blowfish; authentication_algorithm hmac_sha1,hmac_md5; compression_algorithm deflate; } mode_cfg { network4 172.31.31.1; pool_size 100; netmask4 255.255.255.0; dns4 8.8.8.8; auth_source pam; save_passwd on; }