1
alexrezit 2013-10-24 15:15:04 +08:00
ping 一下网站? 转发没设置好?
|
2
lichao OP @alexrezit
拨通后可以 ping 通服务器 IP 地址,但是 ping 不通任何其它 IP 地址 不太懂细节,请问转发应该在哪里设置? 参照的这篇文章,http://safesrv.net/setup-l2tp-over-ipsec-to-authenticate-off-freeradius-on-ubuntu-11-10/ 同时配合了 FreeRADIUS,用户名和密码保存在 FreeRADIUS 里。 |
5
alexrezit 2013-10-24 15:32:00 +08:00
|
6
alexrezit 2013-10-24 15:32:30 +08:00
iptables -t nat -A POSTROUTING -s x.x.x.x/24 -o eth0 -j MASQUERADE
|
7
alexrezit 2013-10-24 15:34:36 +08:00
你可以 -L 一下看看哪里不对.
|
8
lichao OP @alexrezit
root@li471-142:~# iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED Chain OUTPUT (policy ACCEPT) target prot opt source destination |
9
ShadowStar 2013-10-24 15:54:10 +08:00
先查一下本地和服务器的路由
|
10
lichao OP @ShadowStar
@alexrezit 多谢各位,搞定了 For some reason openswan does not start correctly after reboot, so I put the following lines in my /etc/rc.local iptables --table nat --append POSTROUTING --jump MASQUERADE echo 1 > /proc/sys/net/ipv4/ip_forward for each in /proc/sys/net/ipv4/conf/* do echo 0 > $each/accept_redirects echo 0 > $each/send_redirects done /etc/init.d/ipsec restart |