Дистрото е Fedora 4 с ядро 2.6.14-1.1656_FC4. До сега съм
направил следните неща:
iptables -P FORWARD ACCEPT
iptables -t nat -F
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j
MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
на eth0 са ми настройките на доставчика, на eth1
ip192.168.0.1, mask 255.255.255.0
клиентската машина е на W$ с ip 192.168.0.2, mask
255.255.255.0 GW 192.18.0.1
/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
в /etc/resolv.conf
nameserver "ip-to на DNS1 на доставчика"
nameserver "ip-to на DNS2 на доставчика"
Клиентската машина има PING към ип-то на eth0; eth1; DNS на
доставчика на нет.
Проблема е следния при опит да се отвори dir.bg например
пише, че не може да бъде открит хоста. При стартиране чрез
http://"ip-to na dir.bg" всичко е ок.
|