voila.. je ne sais pas trop quoi donné comme information... donc demandez et j'essaye de vous fournir ce que vous voulez...
merci...
-
Dionysos
- Messages : 9
- Géo : Montepellier
Après 15 années d’existence, le forum historique de Framasoft, ferme ses portes.
Pour les nostalgiques et les curieux, il reste toujours possible de consulter les discussions mais c’est maintenant le forum
Framacolibri qui prend la relève.
Si vous avez des questions, on se retrouve là-bas…
ifconfig
netstat -rn
iptables -L
iptables -t nat -L
cat /proc/sys/net/ipv4/ip_forward
[root@localhost ~]# ifconfig
eth0 Lien encap:Ethernet HWaddr 00:11:09:E7:AD:3C
inet adr:192.168.0.1 Bcast:192.168.0.255 Masque:255.255.255.0
adr inet6: fe80::211:9ff:fee7:ad3c/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1659 errors:0 dropped:0 overruns:0 frame:0
TX packets:1841 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:154846 (151.2 Kb) TX bytes:321786 (314.2 Kb)
Interruption:23 Adresse de base:0xe800
lo Lien encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:H
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:775 errors:0 dropped:0 overruns:0 frame:0
TX packets:775 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:53365 (52.1 Kb) TX bytes:53365 (52.1 Kb)
ppp0 Lien encap:Protocole Point-\uffff-Point
inet adr:84.5.153.50 P-t-P:84.5.152.1 Masque:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:2251 errors:0 dropped:0 overruns:0 frame:0
TX packets:2224 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:3
RX bytes:524815 (512.5 Kb) TX bytes:251867 (245.9 Kb)
sit0 Lien encap:IPv6-dans-IPv4
adr inet6: ::127.0.0.1/96 Scope:Inconnu
adr inet6: ::84.5.243.185/96 Scope:Compat
adr inet6: ::192.168.0.1/96 Scope:Compat
UP RUNNING NOARP MTU:1480 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 lg file transmission:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
root@ubuntu:/ # ifconfig
eth0 Lien encap:Ethernet HWaddr 08:00:46:2D:2F:2B
inet adr:192.168.0.2 Bcast:192.168.0.255 Masque:255.255.255.0
adr inet6: fe80::a00:46ff:fe2d:2f2b/64 Scope:Lien
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1240 errors:0 dropped:0 overruns:0 frame:0
TX packets:1667 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:1000
RX bytes:289756 (282.9 KiB) TX bytes:155206 (151.5 KiB)
lo Lien encap:Boucle locale
inet adr:127.0.0.1 Masque:255.0.0.0
adr inet6: ::1/128 Scope:HÃŽte
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:5613 errors:0 dropped:0 overruns:0 frame:0
TX packets:5613 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 lg file transmission:0
RX bytes:501804 (490.0 KiB) TX bytes:501804 (490.0 KiB)
[root@localhost /]# netstat -rn
Table de routage IP du noyau
Destination Passerelle Genmask Indic MSS Fen\ufffftre irtt Iface
84.5.152.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 84.5.152.1 0.0.0.0 UG 0 0 0 ppp0
Table de routage IP du noyau
Destination Passerelle Genmask Indic MSS Fenêtre irtt Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
[root@localhost /]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
root@ubuntu:/ # iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@localhost /]# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
root@ubuntu:/ # iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@localhost /]# cat /proc/sys/net/ipv4/ip_forward
1
root@ubuntu:/ # cat /proc/sys/net/ipv4/ip_forward
0
Dionysos a écrit:Mandriva :
- Code: Tout sélectionner
[root@localhost /]# iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -i eth0 -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -P INPUT DROP
iptables -A FORWARD -i eth0 -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -P FORWARD DROP
iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
/etc/init.d/iptables save
Utilisateur(s) parcourant actuellement ce forum : Aucun utilisateur inscrit