adsl和iptables的问题
前题是ADSL拔号能上网了。
一、脚本放在了/bin/adsl-go
内容是
#!/bin/bash
echo "Starting iptables rules ......."
adsl-stop
adsl-start
route add default ppp0
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -t nat -F
/sbin/depmod -a
/sbin/modprobe ip_tables
/sbin/modprobe iptable_nat
/sbin/modprobe ip_nat_ftp
/sbin/modprobe ipt_LOG
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE
二、局域网出现的问题是
ping www.baidu.com -t 之后是
百分之五不通
三、LOG的错误信息是
ct 24 10:20:02 localhost crond(pam_unix)[4789]: session closed for user root
Oct 24 10:20:02 localhost crond(pam_unix)[4788]: session closed for user root
Oct 24 10:22:25 localhost sshd(pam_unix)[4795]: session opened for user root by root(uid=0)
Oct 24 10:25:01 localhost crond(pam_unix)[4830]: session opened for user root by (uid=0)
Oct 24 10:25:01 localhost crond(pam_unix)[4830]: session closed for user root
Oct 24 10:30:01 localhost crond(pam_unix)[4833]: session opened for user root by (uid=0)
Oct 24 10:30:01 localhost crond(pam_unix)[4834]: session opened for user root by (uid=0)
Oct 24 10:30:01 localhost crond(pam_unix)[4834]: session closed for user root
Oct 24 10:30:02 localhost crond(pam_unix)[4833]: session closed for user root
Oct 24 10:35:01 localhost crond(pam_unix)[4838]: session opened for user root by (uid=0)
Oct 24 10:35:01 localhost crond(pam_unix)[4838]: session closed for user root
Oct 24 10:40:01 localhost crond(pam_unix)[4840]: session opened for user root by (uid=0)
Oct 24 10:40:01 localhost crond(pam_unix)[4841]: session opened for user root by (uid=0)
Oct 24 10:40:01 localhost crond(pam_unix)[4841]: session closed for user root
Oct 24 10:40:01 localhost crond(pam_unix)[4840]: session closed for user root
各位请指点一下问题在什么地方!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
各位仁兄!百忙之中看看我的问题在哪啊?班主各我这个菜LINUX指点指点?
班主应该积极点吗!我看也.....................................................................................................................................................................................................................................................................................
为什么没有人离我呢!是不是我的用SQUID和IPTABLES来完成上网的任务啊!
还是请各位高手,我点播的一下吧!
感谢!感谢!
问题还没有解决!请各位高手继续给指点,问题的可能究竟在什么地方。为什么他会丢包呢!网关不丢,这肯定是在做转化上了!也请班主和大侠帮帮小弟!
什么意思!ping别的网址吗? 把我加上好啊!MSN
没道理会丢包啊,ping 别的地址试试,比如 Linux 的下一跳
现在这个Linux是做为客户端的情况下执行的以下命令
[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux
[root@localhost ~]# free
total used free shared buffers cached
Mem: 1033172 194608 838564 0 41684 74536
-/+ buffers/cache: 78388 954784
Swap: 1020116 0 1020116
[root@localhost ~]# sysctl -a|grep estab
error: unknown error 22 reading key 'net.ipv6.route.flush'
net.ipv4.netfilter.ip_conntrack_tcp_timeout_established = 432000
error: unknown error 22 reading key 'net.ipv4.route.flush'
error: unknown error 22 reading key 'fs.binfmt_misc.register'
[root@localhost ~]# sysctl -a|grep max
dev.raid.speed_limit_max = 200000
dev.rtc.max-user-freq = 64
net.ipv6.conf.eth1.max_addresses = 16
net.ipv6.conf.eth1.max_desync_factor = 600
net.ipv6.conf.eth1.regen_max_retry = 5
net.ipv6.conf.lo.max_addresses = 16
net.ipv6.conf.lo.max_desync_factor = 600
net.ipv6.conf.lo.regen_max_retry = 5
net.ipv6.conf.default.max_addresses = 16
net.ipv6.conf.default.max_desync_factor = 600
net.ipv6.conf.default.regen_max_retry = 5
net.ipv6.conf.all.max_addresses = 16
net.ipv6.conf.all.max_desync_factor = 600
net.ipv6.conf.all.regen_max_retry = 5
net.ipv6.conf.eth0.max_addresses = 16
net.ipv6.conf.eth0.max_desync_factor = 600
net.ipv6.conf.eth0.regen_max_retry = 5
error: unknown error 22 reading key 'net.ipv6.route.flush'
net.ipv6.mld_max_msf = 10
net.ipv6.route.max_size = 4096
net.unix.max_dgram_qlen = 10
net.ipv4.ip_conntrack_max = 65472
net.ipv4.netfilter.ip_conntrack_tcp_max_retrans = 3
net.ipv4.netfilter.ip_conntrack_tcp_timeout_max_retrans = 300
net.ipv4.netfilter.ip_conntrack_max = 65472
error: unknown error 22 reading key 'net.ipv4.route.flush'
net.ipv4.inet_peer_gc_maxtime = 120
net.ipv4.inet_peer_maxttl = 600
net.ipv4.igmp_max_msf = 10
net.ipv4.igmp_max_memberships = 20
net.ipv4.route.max_size = 65536
net.ipv4.route.max_delay = 10
net.ipv4.tcp_max_syn_backlog = 1024
net.ipv4.tcp_max_tw_buckets = 180000
net.ipv4.tcp_max_orphans = 32768
error: unknown error 22 reading key 'fs.binfmt_misc.register'
net.core.somaxconn = 128
net.core.optmem_max = 10240
net.core.netdev_max_backlog = 300
net.core.rmem_max = 262144
net.core.wmem_max = 262144
vm.max_map_count = 65536
kernel.ngroups_max = 65536
kernel.pid_max = 32768
kernel.pty.max = 4096
kernel.threads-max = 32736
kernel.msgmax = 8192
kernel.shmmax = 2147483648
fs.mqueue.msgsize_max = 8192
fs.mqueue.msg_max = 10
fs.mqueue.queues_max = 256
fs.aio-max-nr = 65536
fs.file-max = 65536
[root@localhost ~]# wc -l /proc/net/ip_conntrack
46 /proc/net/ip_conntrack
[root@localhost ~]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 3.06GHz
stepping : 9
cpu MHz : 3059.256
cache size : 1024 KB
physical id : 0
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm pni monitor ds_cpl tm2 cid xtpr
bogomips : 6029.31
processor : 1
vendor_id : GenuineIntel
cpu family : 15
model : 4
model name : Intel(R) Pentium(R) 4 CPU 3.06GHz
stepping : 9
cpu MHz : 3059.256
cache size : 1024 KB
physical id : 0
siblings : 2
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 5
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm pni monitor ds_cpl tm2 cid xtpr
bogomips : 6111.23
[root@localhost ~]#
crond 里是不是每 5 分钟跑了个什么东西?
贴一下下列信息
复制代码
在自个做的网关上ping 外网没有不通的现象!
就局域网内的PC机上有ping不通的现象。