ОСь Федора 4
локаль сетка 192.168.0.0 маска 255.255.255.0 интефейс eth0
внеш. интерфейс ppp0 (Dialup)
настройки фаира
[root@server ~]# iptables -L
Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Firewall-1-INPUT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT icmp -- anywhere anywhere icmp any
ACCEPT ipv6-crypt-- anywhere anywhere
ACCEPT ipv6-auth-- anywhere anywhere
ACCEPT udp -- anywhere 224.0.0.251 udp dpt:5353
ACCEPT udp -- anywhere anywhere udp dpt:ipp
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ftp
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
[root@server ~]# iptables -L -t nat
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
MASQUERADE all -- anywhere anywhere
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
[root@server ~]#
Другие настройки
[root@sonic ~]# cat /proc/sys/net/ipv4/ip_forward
1
настройка sysctl
[root@server ~]# cat /etc/sysctl.conf
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 1
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
net.ipv4.ip_local_port_range = 1024 32768
[root@server ~]#
роутинг при конекти к прову (ppp0) то4нее после
[root@server ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
62.IP.IP.142 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
0.0.0.0 62.IP.IP.142 0.0.0.0 UG 0 0 0 ppp0
[root@server ~]#
Другие зна4ения при конекти к прову ...
[root@server ~]# ifconfig ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:62.IP.139.144 P-t-P:62.IP.128.142 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:18 errors:0 dropped:0 overruns:0 frame:0
TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:5100 (4.9 KiB) TX bytes:3514 (3.4 KiB)
[root@server ~]#
[root@server ~]# iptables -nvL FORWARD
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
8 464 RH-Firewall-1-INPUT all -- * * 0.0.0.0/0 0.0.0.0/0
[root@server ~]#
[root@server ~]# iptables -t nat -nvL
Chain OUTPUT (policy ACCEPT 9 packets, 582 bytes)
pkts bytes target prot opt in out source destination
Chain POSTROUTING (policy ACCEPT 4 packets, 327 bytes)
pkts bytes target prot opt in out source destination
6 315 MASQUERADE all -- * ppp0 0.0.0.0/0 0.0.0.0/0
0 0 MASQUERADE all -- * ppp0 0.0.0.0/0 0.0.0.0/0
Chain PREROUTING (policy ACCEPT 415 packets, 37458 bytes)
pkts bytes target prot opt in out source destination
[root@server ~]#
и еще одна мелоч ...
при конекти к прову ... мопедом
пишется след.
--> Sending: ATZ
ATZ
OK
--> Modem initialized.
--> Sending: ATDT00040404
--> Waiting for carrier.
ATDT00040404
CONNECT 32000/V44
--> Carrier detected. Starting PPP immediately.
.. connection successfully established.
Timeout waiting for the PPP-assigned DNS configuration
и ICMP у прова филтруется ...
ВОпщем не раздает НАТ и все ...
с этим же аккаунтом когда я лезу в инет 4ерез вин машину все ок ...
а с линухом такие траблы ... незнаю где копать ...
не полу4ается настроит НАТ ..
Модераторы: Trinity admin`s, Free-lance moderator`s
много инфы и свиду все вроде верно. Единственное за что я не уверен так это iptables POSTROUTING таблица. Попробуйте очистить построутинг
и прописать что-то вроде:
iptables -A POSTROUTING -o ppp0 -j MASQUERADE --to <IP of ppp0>
ПС: как вы настраивали iptables, в ручную или с помощью какой-то утилиты?
и прописать что-то вроде:
iptables -A POSTROUTING -o ppp0 -j MASQUERADE --to <IP of ppp0>
ПС: как вы настраивали iptables, в ручную или с помощью какой-то утилиты?
Кто сейчас на конференции
Сейчас этот форум просматривают: нет зарегистрированных пользователей и 4 гостя