Ipchains -> Iptables + ipip Tunnel

Leos podpora na bcservice.cz
Středa Srpen 7 15:11:48 CEST 2002


Zdravim,
    mam problem s ip tunelem. Vse funguje v poradku tunel jse nakonfigurovan
spravne . Pouze pokud spustim masquaradu pres ipchains, ktera
zprostredkovava pripojeni ven tunel prestane fungovat na jedne strane na
lokalni siti. Dostanu se akorat na GW. Opacne to i s IPchains funguje v
poradku.
Chtel bych proto a kvuli dalsim duvodum presedlat na IPTables, nicmene
nejsem si jist jak a kde se co konfiguruje.

Tohle je puvodni ipchains za radu dekuji

:input ACCEPT
:forward ACCEPT
:output ACCEPT
-A input -s 0/0 -d 0/0 22 -p tcp -y -j ACCEPT
-A input -s 0/0 -d 0/0 20 -p tcp -y -j ACCEPT
-A input -s 0/0 -d 0/0 -i lo -j ACCEPT
-A input -s 0/0 -d 0/0 -i eth0 -j ACCEPT
-A input -s 0/0 -d 0/0 -i eth1 -j ACCEPT
-A input -s 195.250.128.34 53 -d 0/0 -p udp -j ACCEPT
-A input -s 195.250.128.38 53 -d 0/0 -p udp -j ACCEPT
-A input -s 0/0 -d 0/0 -p tcp -y -j REJECT
-A forward -s 10.2.0.0/24 -d 0/0 -j MASQ
-A input -s 0/0 -d 0/0 -p udp -j REJECT

a tohle ten tunel

    modprobe ipip
    ip t a tunnel1 remote IP.IP.IP.IP ttl 64 mode ipip
    ifconfig tunnel1 10.2.0.1 pointopoint 172.20.21.1 up
    route add -net 172.20.0.0 netmask 255.255.0.0 gw 172.20.21.1




Další informace o konferenci Linux