root@malenstwo:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:02:B3:EA:50:05
inet addr:192.168.23.158 Bcast:192.168.23.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:570 errors:0 dropped:0 overruns:0 frame:0
TX packets:250 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:267490 (261.2 Kb) TX bytes:32247 (31.4 Kb)
Base address:0x7440 Memory:fc220000-fc240000
eth1 Link encap:Ethernet HWaddr 00:02:B3:EA:50:1C
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:504 errors:0 dropped:0 overruns:0 frame:0
TX packets:398 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:46648 (45.5 Kb) TX bytes:99141 (96.8 Kb)
Interrupt:11 Base address:0x6000
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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
root@malenstwo:~# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
localnet * 255.255.255.0 U 0 0 0 eth0
10.0.0.0 * 255.0.0.0 U 0 0 0 eth1
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.23.1 0.0.0.0 UG 1 0 0 eth0
root@malenstwo:~# ping onet.pl
PING onet.pl (213.180.130.200) 56(84) bytes of data.
64 bytes from f1virt.onet.pl (213.180.130.200): icmp_seq=1 ttl=59 time=10.3 ms
64 bytes from f1virt.onet.pl (213.180.130.200): icmp_seq=2 ttl=59 time=10.1 ms
64 bytes from f1virt.onet.pl (213.180.130.200): icmp_seq=3 ttl=59 time=9.94 ms
root@malenstwo:~# ping wp.pl
PING wp.pl (212.77.100.101) 56(84) bytes of data.
64 bytes from
www.wp.pl (212.77.100.101): icmp_seq=1 ttl=122 time=20.7 ms
64 bytes from
www.wp.pl (212.77.100.101): icmp_seq=2 ttl=122 time=20.4 ms
64 bytes from
www.wp.pl (212.77.100.101): icmp_seq=3 ttl=122 time=22.1 ms
wiec chyba blokada po TTL odpada (jak czytalem to zawsze zwraca taki sam a tu zwraca rozne)
standardowe ustawienia z rc.modules (wczesniej na takich chodzilo)
# EXTERNAL -> external network interface
# INTERNAL -> internal network interface
EXTERNAL=eth0
INTERNAL=eth1
echo 1 > /proc/sys/net/ipv4/ip_forward
echo \\"Setting up NAT (Network Address Translation)...\\"
# by default, nothing is forwarded.
iptables -P FORWARD DROP
# Allow all connections OUT and only related ones IN
iptables -A FORWARD -i $EXTERNAL -o $INTERNAL -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i $INTERNAL -o $EXTERNAL -j ACCEPT
# enable MASQUERADING
iptables -t nat -A POSTROUTING -o $EXTERNAL -j MASQUERADE
a po dodaniu tych linijek wciaz to samo
> iptables -t mangle -A PREROUTING -s 10.0.0.0/8 -j TTL --ttl-set 32
> iptables -t mangle -A INPUT -s 10.0.0.1 -j TTL --ttl-inc 1
>
> a po prubie odpalenia wywala
>
> root@malenstwo:/etc/rc.d# ./rc.modules
> Module dependencies up to date (no new kernel modules found).
> Setting up NAT (Network Address Translation)...
> iptables: No chain/target/match by that name
> iptables: No chain/target/match by that name
blagam pomocy bo nie wiem juz co mam z tym zrobic