No wiec tak
po komendzie wyswietla mi cos takiego
ip a l:
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc htb qlen 1000
link/ether 52:54:ac:c4:f9:ce brd ff:ff:ff:ff:ff:ff
inet 83.176.58.130/29 brd 83.176.58.135 scope global eth0
3: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc htb qlen 1000
link/ether 00:0e:ed:06:86:ed brd ff:ff:ff:ff:ff:ff
inet 83.176.58.130/29 brd 83.176.58.135 scope global eth1
4: eth2: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:a1:df:a0:92:97 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global eth2
po ip r l:
83.176.58.128/29 dev eth0 proto kernel scope link src 83.176.58.130
83.176.58.128/29 dev eth1 proto kernel scope link src 83.176.58.130
192.168.1.0/24 dev eth2 proto kernel scope link src 192.168.1.1
127.0.0.0/8 dev lo scope link
default via 83.176.58.131 dev eth0
po ifconf:
eth0 Link encap:Ethernet HWaddr 52:54:AC:C4:F9:CE
inet addr:83.176.58.130 Bcast:83.176.58.135 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:681 errors:0 dropped:0 overruns:0 frame:0
TX packets:87 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:52229 (51.0 Kb) TX bytes:5220 (5.0 Kb)
Interrupt:5 Base address:0xd400
eth1 Link encap:Ethernet HWaddr 00:0E:ED:06:86:ED
inet addr:83.176.58.130 Bcast:83.176.58.135 Mask:255.255.255.248
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:407 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:36232 (35.3 Kb) TX bytes:120 (120.0 b)
Interrupt:11 Base address:0xd000
eth2 Link encap:Ethernet HWaddr 00:A1:DF:A0:92:97
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:26 errors:0 dropped:0 overruns:0 frame:0
TX packets:120 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3276 (3.1 Kb) TX bytes:9052 (8.8 Kb)
Interrupt:12 Base address:0xd800
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:78 errors:0 dropped:0 overruns:0 frame:0
TX packets:78 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6102 (5.9 Kb) TX bytes:6102 (5.9 Kb)
a plik rc.inet1 wyglada tak:
#!/bin/sh
IPE1="83.176.58.130"
MASK1="255.255.255.248"
IPE2="192.168.1.1"
MASK2="255.255.255.0"
IPE3="192.168.254.2"
MASK3="255.255.255.0"
/sbin/ifconfig lo 127.0.0.1
/sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo
#GETEWAY="83.176.58.129"
BROADCAST=`/bin/ipmask ${MASK1} ${IPE1} | cut -f 1 -d ' '`
BROADCAST3=`/bin/ipmask ${MASK3} ${IPE3} | cut -f 1 -d ' '`
NETWORK=`/bin/ipmask ${MASK1} ${IPE1} | cut -f 2 -d ' '`
/sbin/ifconfig eth0 ${IPE1} broadcast ${BROADCAST} netmask ${MASK1}
/sbin/ifconfig eth1 ${IPE1} broadcast ${BROADCAST} netmask ${MASK1}
/sbin/ifconfig eth2 ${IPE2} netmask ${MASK2}
#/sbin/route add default gw ${GETEWAY} metric 1
echo "Tablice routowania"
echo "Etap 1:1"
ip route add 83.176.58.129/30 dev eth0 src 83.176.58.130 table T1
ip route add default via 83.176.58.131 table T1
echo "Etap 1:2"
ip route add 192.168.254.0/25 dev eth1 src 1 table T2
ip route add default via 192.168.254.1 table T2
echo "Etap 2:1"
ip route add 83.176.58.129/30 dev eth0 src 83.176.58.130
echo "Etap 2:2"
ip route add 192.168.254.0/25 dev eth1 src 192.168.254.2
echo "Etap 3"
ip route add default via 83.176.58.131
echo "Etap 4:1"
ip rule add from 83.176.58.130 table T1
echo "Etap 4:2"
ip rule add from 192.168.254.2 table T2
echo "Etap 5:1"
ip route add 192.168.1.0/16 dev eth2 table T1
ip route add 83.176.58.129/30 dev eth0 table T1
ip route add 127.0.0.0/8 dev lo table T1
echo "Etap 5:2"
ip route add 192.168.1.0/16 dev eth2 table T2
ip route add 192.168.254.1/25 dev eth1 table T2
ip route add 127.0.0.0/8 dev lo table T2
echo "Flush"
ip route flush cache
no i rzecz jasna zapisalem te cale reguBki w rc.firewall dodalem i w squid.conf takze. niewiem co jeszcze no te tablice T1 i T2 tez dodalem. i niewim co nie tak ten pierwszy adres to dsl ten drugi to jest router mój ktory pobiera sygnal z neo jest podlaczony tylko pod tego server i niema nic zablokowane adres ip nadalem routerowi 192.168.254.1
moze jakis inny powinien byc lub jakies bledy w inet1 ale juz sam niewiem moze te odczyty cos pomoga ;]
p.s. tablica wyglada tak:
####################
# reserved values
###################
201 T1
202 T2
255 local
254 main
253 default
0 unspec
#
# local
#
#1 inr.ruhep
###########
oczywiscie wszytkie pliki tam gdzie maja # to komentarze sa
