Prihlásiť sa Odoslať Novinky :: FAQ :: Rozšírené vyhľadávanie :: Napísali o nás :: Ankety
Main Menu
· Home
· 
· FAQ
· 
· Diskusia
· 











Main Menu
· Domov

Moduly
· AvantGo
· Downloads
· FAQ
· News
· Recommend Us
· Reviews
· Search
· Sections
· Stats
· Topics
· Top List
· Web Links
· Forum

Jazyk
Výber jazykovej mutácie:



The time now is 27.04.2024 - 23:28


shaper podla roberta

Post new topic Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
 
Author Message
alwarez
Post subject: shaper podla roberta  PostPosted: 11.12.2007 - 10:04 #59625
Basic


Joined: Máj 22, 2005
Posts: 477
Location: Michalovce
robim novy shaper podla navodu, lokalne IP adresy mi shapuje v pohode,ale verejne mi neprepusti cez router.

Code: ›
    modprobe ipip

    ip tunnel add inbound mode ipip remote 127.0.0.3 local 127.0.0.2
    ip tunnel add outbound mode ipip remote 127.0.0.2 local 127.0.0.3

    ip addr add 127.0.0.2/32 dev inbound
    ip addr add 127.0.0.3/32 dev outbound

    ip link set inbound up
    ip link set outbound up

    ip ro add 85.237.228.0/27 dev inbound table tunnel
    ip ro add 10.10.10.0/24 dev inbound table tunnel

    ip ro add default dev outbound table tunnel
    ip rule add iif eth0 lookup tunnel pref 100
    ip rule add to 85.237.228.0/27 lookup main pref 101
    ip rule add to 10.10.10.0/24 lookup main pref 101

    ip rule add iif eth1 lookup tunnel pref 102
    echo 0 >/proc/sys/net/ipv4/conf/inbound/rp_filter
    echo 0 >/proc/sys/net/ipv4/conf/outbound/rp_filter
    ip route flush cache
    iptables -t raw -A PREROUTING -i eth1 -j NOTRACK
    iptables -t raw -A PREROUTING -i outbound -j NOTRACK
 
    ip link set tx 100 dev inbound
    ip link set tx 100 dev outbound



eth0 213.151.202.204/25
eth1 85.237.228.1/27
eth1:1 10.10.10.1/24

10.10.10.0/24 siet mi bezi v pohode, vsetko shapuje ako ma

ale zo siete 85.237.228.0/27 dokazem pingnut len na router eth0, dalej ma nepusti.

ak tie pravidla vysie zrusim tak verejna siet bezi bez prob.

neviete poradit co s tym?
dik
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Robert
Post subject: RE: shaper podla roberta  PostPosted: 11.12.2007 - 12:49 #59629
Majster


Joined: Okt 19, 2003
Posts: 2339
Location: Bratislava
Nejak tam nevidim SNAT na eth0.
Pusti si tcpdump na eth0, co sa tam deje. S akou IP adresou ping odchadza do Internetu.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
alwarez
Post subject: RE: shaper podla roberta  PostPosted: 11.12.2007 - 16:39 #59641
Basic


Joined: Máj 22, 2005
Posts: 477
Location: Michalovce
Robert wrote: ›Nejak tam nevidim SNAT na eth0.
Pusti si tcpdump na eth0, co sa tam deje. S akou IP adresou ping odchadza do Internetu.


firewall a tc pravidla nasleduju za tymto scriptom (tie su ok), SNAT je nizsie ale vztahuje sa len na lokalne IP ktore bezia, nebezi mi verejna siet, ktora logicky nejde cez SNAT.
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Robert
Post subject: RE: shaper podla roberta  PostPosted: 11.12.2007 - 18:55 #59647
Majster


Joined: Okt 19, 2003
Posts: 2339
Location: Bratislava
Pouzi ten tcpdump na eth0, aby si videl, co Ti odchadza a co sa vracia (ak vobec nieco).
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
All times are GMT
Post new topic Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
 
Jump to:  

Powered by PNphpBB2 © 2003-2005 The PNphpBB Group
Credits

(C) SKFree 2002-2010: Powered by POSTNUKE. Môžete prebera? naše správy vo formáte XML(RSS)