LINUX.ORG.RU
ФорумAdmin

ROUTE+IPTABLES+NAT+Load balancing ????


0

0

problema takaja, est potrebnost sdelat router iz localki v dva DSL s load balancigom.

v nastiojaschij moment est Linux Slackware, na kotorom ne rabotaet dazhe prostoj routing, nesmotrja na to chto vse karty rabotajut, route nastroeno, gateway ustanovleny, kernel otkonfigurirovan normalno. no routing ne rabotaet. Mozhet nado skofigurirovat maskarad? No kak? ja tak i ne nashel howto kotoroe pishet kak eto sdelat na iptables :((((((

anonymous

Koroche est tak SDSL eth1 _______________ ---------------|62.89.68.153 | 62.89.68.145 |255.255.255.240| | | |192.168.1.100 | etho |255.255.255.0 |---------- 192.168.1.x/24 set | | | | SDSL eth2 |213.241.18.253 | ---------------|255.255.255.240| 213.241.18.241 -----------------

koroche ne rabotaet u menja dazhe prostejshij routing s 192.168.1.100 na 62.89.68.145

kak ja sdelal? -- chtoto takoe... ##################rc.inet1########################### IPADDR="192.168.1.100" # REPLACE with YOUR IP address! NETMASK="255.255.255.0" # REPLACE with YOUR netmask!

IPADDR2="62.89.68.153" # REPLACE with YOUR IP address! NETMASK2="255.255.255.240" # REPLACE with YOUR netmask!

if [ ! "$IPADDR" = "127.0.0.1" -a ! "$IPADDR" = "" ]; then BROADCAST=`/bin/ipmask $NETMASK $IPADDR | cut -f 1 -d ' '` NETWORK=`/bin/ipmask $NETMASK $IPADDR | cut -f 2 -d ' '`

echo "Configuring eth0:" echo "ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK}" /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK} fi # set up eth0

if [ ! "$IPADDR2" = "127.0.0.1" -a ! "$IPADDR2" = "" ]; then # Determine broadcast and network addresses from the IP address and netmask: BROADCAST2=`/bin/ipmask $NETMASK2 $IPADDR2 | cut -f 1 -d ' '` NETWORK2=`/bin/ipmask $NETMASK2 $IPADDR2 | cut -f 2 -d ' '`

echo "Configuring eth1:" echo "ifconfig eth1 ${IPADDR2} broadcast ${BROADCAST2} netmask ${NETMASK2}" /sbin/ifconfig eth1 ${IPADDR2} broadcast ${BROADCAST2} netmask ${NETMASK2} fi # set up eth1 # End of /etc/rc.d/rc.inet1 ####################################################################

iptables -A FORWARD -j ACCEPT iptables -A INPUT -j ACCEPT iptables -A OUTPUT -j ACCEPT

#####################################################################

route add -host 62.89.68.145 metric 30 eth1 route add default gw 62.89.68.145 metric 30

######################################################################

if [ -r /proc/sys/net/ipv4/ip_forward ]; then echo "Vkluchenie IP forward" echo "1" > /proc/sys/net/ipv4/ip_forward fi ######################################################################

if [ -r /proc/sys/net/ipv4/conf/all/accept_source_route ]; then echo "Vkluchenie potderzhat ruting" echo "1" > /proc/sys/net/ipv4/conf/all/accept_source_route fi

######################################################################

if [ -r /proc/sys/net/ipv4/conf/all/rp_filter ]; then echo "Vykluchenie RP filter" echo "0" > /proc/sys/net/ipv4/conf/all/rp_filter fi

######################################################################

A vot kak Maskarad nastroit na iptables ja ne znaju.

######################################################################

anonymous
()

Koroche est tak SDSL eth1 xxxxxx_______________ ---------------|62.89.68.153xxx| 62.89.68.145xxxx|255.255.255.240| xxxxxxxxxxxxxxxx|xxxxxxxxxxxxxxx| xxxxxxxxxxxxxxxx|192.168.1.100xx| etho xxxxxxxxxxxxxxxx|255.255.255.0xx|---------- 192.168.1.x/24 set xxxxxxxxxxxxxxxx|xxxxxxxxxxxxxxx| SDSL eth2 xxxxxx|213.241.18.253 | ----------------|255.255.255.240| 213.241.18.241xx-----------------

anonymous
()

Koroche est tak SDSL eth1 xxxxxx_______________ ---------------|62.89.68.153xxx| 62.89.68.145xxxx|255.255.255.240| Koroch est takxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SDSL eth1 xxxxxx_______________xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ---------------|62.89.68.153xxx|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 62.89.68.145xxxx|255.255.255.240|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx|xxxxxxxxxxxxxxx|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx|192.168.1.100xx| ethoxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx|255.255.255.0xx|---------- 192.168.1.x/24 setx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxx|xxxxxxxxxxxxxxx|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx SDSL eth2 xxxxxx|213.241.18.253 |xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ----------------|255.255.255.240|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 213.241.18.241xx----------------- xxxxxxxxxxxxxxxxx

VMEST xxxxx -- probely, prosto dvizhok foruma hrenovyj, sorry

anonymous
()

Koroche est tak
SDSL eth1 xxxxxx_______________
---------------|62.89.68.153xxx|
62.89.68.145xxxx|255.255.255.240|
xxxxxxxxxxxxxxxx|xxxxxxxxxxxxxxx|
xxxxxxxxxxxxxxxx|192.168.1.100xx| etho
xxxxxxxxxxxxxxxx|255.255.255.0xx|---------- 192.168.1.x/24 set
xxxxxxxxxxxxxxxx|xxxxxxxxxxxxxxx|
SDSL eth2 xxxxxx|213.241.18.253 |
----------------|255.255.255.240|
213.241.18.241xx-----------------

anonymous
()

Koroche est tak
SDSL eth1 _______________
---------------|62.89.68.153xxx|
62.89.68.145 |255.255.255.240|
|xxxxxxxxxxxxxxx|
|192.168.1.100xx| etho
|255.255.255.0xx|---------- 192.168.1.x/24 set
|xxxxxxxxxxxxxxx|
SDSL eth2|213.241.18.253 |
----------------|255.255.255.240|
213.241.18.241xx-----------------

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.