Prosíme přihlašte se nebo zaregistrujte.

Přihlašte se svým uživatelským jménem a heslem.
Vaše pomoc je stále potřeba!

Autor Téma: dvě konektivity  (Přečteno 5873 krát)

locus

  • Aktivní člen
  • *
  • Příspěvků: 398
Re: dvě konektivity
« Odpověď #25 kdy: 26 Května 2010, 09:15:56 »
takže jsem vzal kamaraduv telefon s 3.G a zadal tu doménu co má jít přes eth1 tedy přes to adslko a zároven jsem sledoval akce na sitivce eth1
Kód: [Vybrat]
root@locus:~# tcpdump -ni eth1
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth1, link-type EN10MB (Ethernet), capture size 96 bytes
09:12:00.990141 IP 160.218.160.162.49833 > 10.0.0.140.80: S 2987700808:2987700808(0) win 7380 <mss 1380,sackOK,timestamp 1229222947 0,nop,wscale 2>
09:12:05.983758 arp who-has 10.0.0.140 tell 10.0.0.138
09:12:05.983775 arp reply 10.0.0.140 is-at 00:27:19:b0:0f:5d
09:12:12.989682 IP 160.218.160.162.49833 > 10.0.0.140.80: S 2987700808:2987700808(0) win 7380 <mss 1380,sackOK,timestamp 1229234947 0,nop,wscale 2>
09:12:20.613338 IP 10.0.0.139.17500 > 255.255.255.255.17500: UDP, length 106
09:12:20.613784 IP 10.0.0.139.17500 > 10.0.0.255.17500: UDP, length 106
09:12:28.369246 IP 160.218.160.162.55635 > 10.0.0.140.80: S 3045038638:3045038638(0) win 7380 <mss 1380,sackOK,timestamp 1229250327 0,nop,wscale 2>
09:12:31.369465 IP 160.218.160.162.55635 > 10.0.0.140.80: S 3045038638:3045038638(0) win 7380 <mss 1380,sackOK,timestamp 1229253327 0,nop,wscale 2>
09:12:33.364647 arp who-has 10.0.0.140 tell 10.0.0.138
09:12:33.364672 arp reply 10.0.0.140 is-at 00:27:19:b0:0f:5d
09:12:37.368919 IP 160.218.160.162.55635 > 10.0.0.140.80: S 3045038638:3045038638(0) win 7380 <mss 1380,sackOK,timestamp 1229259327 0,nop,wscale 2>
09:12:49.368704 IP 160.218.160.162.55635 > 10.0.0.140.80: S 3045038638:3045038638(0) win 7380 <mss 1380,sackOK,timestamp 1229271327 0,nop,wscale 2>
09:12:50.646297 IP 10.0.0.139.17500 > 255.255.255.255.17500: UDP, length 106
09:12:50.646745 IP 10.0.0.139.17500 > 10.0.0.255.17500: UDP, length 106
09:12:51.082439 IP 160.218.160.162.59297 > 10.0.0.140.80: S 3833730138:3833730138(0) win 7380 <mss 1380,sackOK,timestamp 1229273040 0,nop,wscale 2>

15 packets captured
15 packets received by filter
0 packets dropped by kernel

nevim mě to tak něják nic ted neříká.

ETNyx

  • Aktivní člen
  • *
  • Příspěvků: 425
Re: dvě konektivity
« Odpověď #26 kdy: 26 Května 2010, 10:41:31 »
Přiznám se, že mne taky moc ne :-D. Pokud budeme předpokládat, že ty pakety jsou z toho mobilu (160.218.160.162.55635 > 10.0.0.140.80: přišlo na port 80), tj dorazili do cíle a přesto se stránka nezobrazila tak sem pošlete logy apache z této doby
jabber: etnyx@jabbim.cz

locus

  • Aktivní člen
  • *
  • Příspěvků: 398
Re: dvě konektivity
« Odpověď #27 kdy: 26 Května 2010, 12:09:03 »
no tak toto tam bylo
Kód: [Vybrat]
[Wed May 26 09:16:39 2010] [error] [client 10.0.0.139] File does not exist: /var/www/sokol/favicon.ico
[Wed May 26 09:16:39 2010] [error] [client 10.0.0.139] File does not exist: /var/www/sokol/favicon.ico

ale toto je hlaska z místní sítě jak jsem se připojoval z toho telefonu tam neni ani ani radecek.


ještě mi bylo doporučené že na toto musím mít nastavit policy based routing.

a doporučení jak to je na gentoo
Kód: [Vybrat]
config_eth0=( "192.168.168.78 netmask 255.255.255.0" )
routes_eth0=( "default via 192.168.168.1" )

config_eth1=( "10.10.10.110 netmask 255.255.255.0" )
routes_eth1=(
        "127.0.0.0/8 dev lo table upc"
        "10.10.10.0/24 via 10.10.10.110 dev eth1 table upc"
        "default via 10.10.10.1 table upc"
)

postup() {
    if [ ${IFACE} == "eth1" ] ; then
        einfo "Adding IP policy routing rules"
        ip rule add from 10.10.10.110 table upc

        # Flush the route cache
        ip route flush cache dev "${IFACE}"
    fi
}

postdown() {
    if [ ${IFACE} == "eth1" ] ; then
        einfo "Removing IP policy routing rules"
        ip rule del from 10.10.10.110 table upc

        # Flush the route cache
        ip route flush cache dev "${IFACE}"
    fi
    return 0
}

prosim vas nevite jak se to ma upravit na ubuntu?

locus

  • Aktivní člen
  • *
  • Příspěvků: 398
Re: dvě konektivity
« Odpověď #28 kdy: 26 Května 2010, 13:08:39 »
jde vůbec PBR policy based routing na ubuntu? Zatím jsme nikde našel na googli poradne dokumentaci.
nevíte pls?

locus

  • Aktivní člen
  • *
  • Příspěvků: 398
Re: dvě konektivity
« Odpověď #29 kdy: 26 Května 2010, 13:18:33 »
zkouším něco takovho ale to nebude ono že?
Kód: [Vybrat]
#Start eth0 static
auto eth0
iface eth0 inet static
    address 192.168.1.2
    netmask 255.255.255.0
    gateway 192.168.1.1
    dns-server 192.168.1.1

#Start eth1 static
auto eth1
iface eth1 inet static
    address 10.0.0.140
    netmask 255.255.255.0
    gateway 10.0.0.140
    dns-server 10.0.0.138

locus

  • Aktivní člen
  • *
  • Příspěvků: 398
Re: dvě konektivity
« Odpověď #30 kdy: 26 Května 2010, 13:47:04 »

s tím že jak jsem měl v virtualech to <VirtualHost 10.0.0.140:80> tak to jsem zrusil vsude ted je jen <VirtualHost *:80>
uz opravdu netusím kde to vazne.

s tím ze sit koniguruju pres tento soubor:
Kód: [Vybrat]
#smazu vsechno routovani
ip route flush table all
ip rule flush
#nastavim eth0
ip addr flush dev eth0
ip addr add 192.168.1.2/24 dev eth0
ip link set dev eth0 up
ip rule add from 192.168.1.2 table 10
ip route add default via 192.168.1.1 dev eth0 src 192.168.1.2 table 10
#nastavim eth1
ip addr flush dev eth1
ip addr add 10.0.0.140/24 dev eth1
ip link set dev eth1 up
ip rule add from 10.0.0.140 table 20
ip route add default via 10.0.0.138 dev eth1 src 10.0.0.140 table 20
ip rule add from all lookup main priority 32766
ip rule add from all lookup default priority 32767
ip rule add from 192.168.1.2 table 10
ip rule add from 10.0.0.140 table 20



locus

  • Aktivní člen
  • *
  • Příspěvků: 398
Re: dvě konektivity
« Odpověď #31 kdy: 26 Května 2010, 13:49:11 »
Kód: [Vybrat]
13:32:25.668099 IP (tos 0x0, ttl 64, id 15812, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36979 > 10.0.0.140.www: ., cksum 0x31ef (correct), ack 2897 win 182 <nop,nop,timestamp 56238506 806668>
13:32:25.668133 IP (tos 0x0, ttl 64, id 23166, offset 0, flags [DF], proto TCP (6), length 1500) 10.0.0.140.www > 10.0.0.139.36979: . 7241:8689(1448) ack 396 win 54 <nop,nop,timestamp 806668 56238506>
13:32:25.668136 IP (tos 0x0, ttl 64, id 23167, offset 0, flags [DF], proto TCP (6), length 1500) 10.0.0.140.www > 10.0.0.139.36979: . 8689:10137(1448) ack 396 win 54 <nop,nop,timestamp 806668 56238506>
13:32:25.668325 IP (tos 0x0, ttl 64, id 15813, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36979 > 10.0.0.140.www: ., cksum 0x2c1a (correct), ack 4345 win 227 <nop,nop,timestamp 56238506 806668>
13:32:25.668349 IP (tos 0x0, ttl 64, id 23168, offset 0, flags [DF], proto TCP (6), length 1054) 10.0.0.140.www > 10.0.0.139.36979: P 10137:11139(1002) ack 396 win 54 <nop,nop,timestamp 806669 56238506>
13:32:25.668329 IP (tos 0x0, ttl 64, id 62390, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36983 > 10.0.0.140.www: ., cksum 0x0e06 (correct), ack 1449 win 137 <nop,nop,timestamp 56238506 806668>
13:32:25.668330 IP (tos 0x0, ttl 64, id 62391, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36983 > 10.0.0.140.www: ., cksum 0x0bd9 (correct), ack 1961 win 182 <nop,nop,timestamp 56238506 806668>
13:32:25.668330 IP (tos 0x0, ttl 64, id 18319, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36978 > 10.0.0.140.www: ., cksum 0x8967 (correct), ack 21901 win 816 <nop,nop,timestamp 56238506 806668>
13:32:25.668332 IP (tos 0x0, ttl 64, id 18320, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36978 > 10.0.0.140.www: ., cksum 0x8904 (correct), ack 22000 win 816 <nop,nop,timestamp 56238506 806668>
13:32:25.668333 IP (tos 0x0, ttl 64, id 1484, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36980 > 10.0.0.140.www: ., cksum 0x1155 (correct), ack 1449 win 137 <nop,nop,timestamp 56238506 806668>
13:32:25.668424 IP (tos 0x0, ttl 64, id 1485, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36980 > 10.0.0.140.www: ., cksum 0x0fcf (correct), ack 1794 win 182 <nop,nop,timestamp 56238506 806668>
13:32:25.668834 IP (tos 0x0, ttl 64, id 49879, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36982 > 10.0.0.140.www: ., cksum 0x63bc (correct), ack 1449 win 137 <nop,nop,timestamp 56238506 806668>
13:32:25.668835 IP (tos 0x0, ttl 64, id 49880, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36982 > 10.0.0.140.www: ., cksum 0x602b (correct), ack 2317 win 182 <nop,nop,timestamp 56238506 806668>
13:32:25.669203 IP (tos 0x0, ttl 64, id 15814, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36979 > 10.0.0.140.www: ., cksum 0x2644 (correct), ack 5793 win 273 <nop,nop,timestamp 56238506 806668>
13:32:25.669203 IP (tos 0x0, ttl 64, id 15815, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36979 > 10.0.0.140.www: ., cksum 0x206f (correct), ack 7241 win 318 <nop,nop,timestamp 56238506 806668>
13:32:25.669325 IP (tos 0x0, ttl 64, id 15816, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36979 > 10.0.0.140.www: ., cksum 0x1a9a (correct), ack 8689 win 363 <nop,nop,timestamp 56238506 806668>
13:32:25.669326 IP (tos 0x0, ttl 64, id 15817, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36979 > 10.0.0.140.www: ., cksum 0x14c5 (correct), ack 10137 win 408 <nop,nop,timestamp 56238506 806668>
13:32:25.669448 IP (tos 0x0, ttl 64, id 15818, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36979 > 10.0.0.140.www: ., cksum 0x10ac (correct), ack 11139 win 454 <nop,nop,timestamp 56238506 806669>
13:32:25.766702 IP (tos 0x0, ttl 64, id 31351, offset 0, flags [DF], proto TCP (6), length 446) 10.0.0.139.36981 > 10.0.0.140.www: P 395:789(394) ack 1599 win 182 <nop,nop,timestamp 56238530 806664>
13:32:25.766711 IP (tos 0x0, ttl 64, id 7020, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.140.www > 10.0.0.139.36981: ., cksum 0xb856 (correct), ack 789 win 62 <nop,nop,timestamp 806678 56238530>
13:32:25.767046 IP (tos 0x0, ttl 64, id 7021, offset 0, flags [DF], proto TCP (6), length 1500) 10.0.0.140.www > 10.0.0.139.36981: . 1599:3047(1448) ack 789 win 62 <nop,nop,timestamp 806678 56238530>
13:32:25.767055 IP (tos 0x0, ttl 64, id 7022, offset 0, flags [DF], proto TCP (6), length 687) 10.0.0.140.www > 10.0.0.139.36981: P 3047:3682(635) ack 789 win 62 <nop,nop,timestamp 806678 56238530>
13:32:25.767992 IP (tos 0x0, ttl 64, id 31352, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36981 > 10.0.0.140.www: ., cksum 0xb208 (correct), ack 3047 win 227 <nop,nop,timestamp 56238531 806678>
13:32:25.767993 IP (tos 0x0, ttl 64, id 31353, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36981 > 10.0.0.140.www: ., cksum 0xaf5f (correct), ack 3682 win 273 <nop,nop,timestamp 56238531 806678>
13:32:26.343462 IP (tos 0x0, ttl 64, id 15819, offset 0, flags [DF], proto TCP (6), length 446) 10.0.0.139.36979 > 10.0.0.140.www: P 396:790(394) ack 11139 win 454 <nop,nop,timestamp 56238675 806669>
13:32:26.343482 IP (tos 0x0, ttl 64, id 23169, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.140.www > 10.0.0.139.36979: ., cksum 0x0fbe (correct), ack 790 win 62 <nop,nop,timestamp 806736 56238675>
13:32:26.343789 IP (tos 0x0, ttl 64, id 62392, offset 0, flags [DF], proto TCP (6), length 449) 10.0.0.139.36983 > 10.0.0.140.www: P 395:792(397) ack 1961 win 182 <nop,nop,timestamp 56238675 806668>
13:32:26.343805 IP (tos 0x0, ttl 64, id 51028, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.140.www > 10.0.0.139.36983: ., cksum 0x09d7 (correct), ack 792 win 62 <nop,nop,timestamp 806736 56238675>
13:32:26.344198 IP (tos 0x0, ttl 64, id 18321, offset 0, flags [DF], proto TCP (6), length 458) 10.0.0.139.36978 > 10.0.0.140.www: P 1218:1624(406) ack 22000 win 816 <nop,nop,timestamp 56238675 806668>
13:32:26.344216 IP (tos 0x0, ttl 64, id 27343, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.140.www > 10.0.0.139.36978: ., cksum 0x8962 (correct), ack 1624 win 79 <nop,nop,timestamp 806736 56238675>
13:32:26.347371 IP (tos 0x0, ttl 64, id 23170, offset 0, flags [DF], proto TCP (6), length 1500) 10.0.0.140.www > 10.0.0.139.36979: . 11139:12587(1448) ack 790 win 62 <nop,nop,timestamp 806736 56238675>
13:32:26.347386 IP (tos 0x0, ttl 64, id 23171, offset 0, flags [DF], proto TCP (6), length 760) 10.0.0.140.www > 10.0.0.139.36979: P 12587:13295(708) ack 790 win 62 <nop,nop,timestamp 806736 56238675>
13:32:26.347578 IP (tos 0x0, ttl 64, id 51029, offset 0, flags [DF], proto TCP (6), length 1263) 10.0.0.140.www > 10.0.0.139.36983: P 1961:3172(1211) ack 792 win 62 <nop,nop,timestamp 806736 56238675>
13:32:26.348541 IP (tos 0x0, ttl 64, id 15820, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36979 > 10.0.0.140.www: ., cksum 0x0860 (correct), ack 12587 win 499 <nop,nop,timestamp 56238676 806736>
13:32:26.348542 IP (tos 0x0, ttl 64, id 15821, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36979 > 10.0.0.140.www: ., cksum 0x056f (correct), ack 13295 win 544 <nop,nop,timestamp 56238676 806736>
13:32:26.348543 IP (tos 0x0, ttl 64, id 62393, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36983 > 10.0.0.140.www: ., cksum 0x0476 (correct), ack 3172 win 227 <nop,nop,timestamp 56238676 806736>
13:32:26.348970 IP (tos 0x0, ttl 64, id 1486, offset 0, flags [DF], proto TCP (6), length 450) 10.0.0.139.36980 > 10.0.0.140.www: P 395:793(398) ack 1794 win 182 <nop,nop,timestamp 56238676 806668>
13:32:26.348985 IP (tos 0x0, ttl 64, id 31987, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.140.www > 10.0.0.139.36980: ., cksum 0x0dca (correct), ack 793 win 62 <nop,nop,timestamp 806737 56238676>
13:32:26.349113 IP (tos 0x0, ttl 64, id 49881, offset 0, flags [DF], proto TCP (6), length 452) 10.0.0.139.36982 > 10.0.0.140.www: P 395:795(400) ack 2317 win 182 <nop,nop,timestamp 56238676 806668>
13:32:26.349127 IP (tos 0x0, ttl 64, id 27713, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.140.www > 10.0.0.139.36982: ., cksum 0x5e24 (correct), ack 795 win 62 <nop,nop,timestamp 806737 56238676>
13:32:26.355721 IP (tos 0x0, ttl 64, id 27344, offset 0, flags [DF], proto TCP (6), length 951) 10.0.0.140.www > 10.0.0.139.36978: P 22000:22899(899) ack 1624 win 79 <nop,nop,timestamp 806737 56238675>
13:32:47.843534 IP (tos 0x0, ttl 64, id 62395, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36983 > 10.0.0.140.www: F, cksum 0xe999 (correct), 792:792(0) ack 3173 win 227 <nop,nop,timestamp 56244050 808236>
13:32:47.843555 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.140.www > 10.0.0.139.36983: ., cksum 0xe7b4 (correct), ack 793 win 62 <nop,nop,timestamp 808886 56244050>
13:32:47.843536 IP (tos 0x0, ttl 64, id 49889, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36982 > 10.0.0.140.www: F, cksum 0x29bc (correct), 1190:1190(0) ack 7927 win 408 <nop,nop,timestamp 56244050 808427>
13:32:47.843560 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.140.www > 10.0.0.139.36982: ., cksum 0x2942 (correct), ack 1191 win 71 <nop,nop,timestamp 808886 56244050>
13:32:47.843537 IP (tos 0x0, ttl 64, id 1499, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36980 > 10.0.0.140.www: F, cksum 0xbac9 (correct), 1188:1188(0) ack 15009 win 635 <nop,nop,timestamp 56244050 808427>
13:32:47.843566 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.140.www > 10.0.0.139.36980: ., cksum 0xbb32 (correct), ack 1189 win 71 <nop,nop,timestamp 808886 56244050>
13:32:47.843539 IP (tos 0x0, ttl 64, id 18328, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.139.36978 > 10.0.0.140.www: F, cksum 0x5fb6 (correct), 2365:2365(0) ack 23927 win 951 <nop,nop,timestamp 56244050 808488>
13:32:47.843570 IP (tos 0x0, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52) 10.0.0.140.www > 10.0.0.139.36978: ., cksum 0x617f (correct), ack 2366 win 96 <nop,nop,timestamp 808886 56244050>

233 packets captured
233 packets received by filter
0 packets dropped by kernel

locus

  • Aktivní člen
  • *
  • Příspěvků: 398
Re: dvě konektivity
« Odpověď #32 kdy: 26 Května 2010, 14:25:38 »
je potřeba nastavit aby co příjde z eth0 aby takdy odpovídalo přes eth0 a to stejné u eth1.

nevítě pls někdo jak by to šlo zrealizovat?

locus

  • Aktivní člen
  • *
  • Příspěvků: 398
Re: dvě konektivity
« Odpověď #33 kdy: 26 Května 2010, 19:19:06 »
nevíte prosím vás kde bych mohl najít něco o routování?
něco co povali na ubuntu?

locus

  • Aktivní člen
  • *
  • Příspěvků: 398
Re: dvě konektivity
« Odpověď #34 kdy: 27 Května 2010, 16:04:41 »
takže jsem poleno asi by se to dalo vyřešit jednodušejí. Zjistil jsem že mám na wifi router s dvěma wankama a umí load balancing. TP-LINK TL-R480T+. Takže teoreticky by ted stačilo adsl dostat do wanky. Mám adsl router od O2 WELL PTI-845 prý by měl umět bridge ale zatím jse mi to nepodařilo nalézt.

http://www.ipmedia.cz/default.asp?cls=stoitem&stiid=911

Nevítě někdo? doporučili by jste mi jiný modem??
Jde to tak doufám řešit s tím routerem s dvěma wankama?

locus

  • Aktivní člen
  • *
  • Příspěvků: 398
Re: dvě konektivity
« Odpověď #35 kdy: 27 Května 2010, 16:08:41 »
tady jsem našel navod ale furt nevim jak na ten bridge..

http://www.cz.o2.com/_pub/6f/8/d/113919_142744_pti845_manual_cz.pdf

nevítě prosim někdo?

 

Provoz zaštiťuje spolek OpenAlt.