Newsgroup: it.comp.os.linux.development
Titolo: Nat

Salve ragazzi,
vorrei nattare il mio web server che all'interno della mia rete in modo che
sia visibile da Internet.
ho provato a fare il nat in questo modo
iptables -t nat -A PREROUTING -d 194.185.53.52 -p tcp --dport 85 -j
DNAT --to-destination 
192.168.0.101:85
ma non funziona
http://194.185.53.52
funziona invece
http://192.168.0.101
ifconfig della mia red hat 7.3 č:
eth0      Link encap:Ethernet  HWaddr 00:40:F4:B1:37:6D
          inet addr:192.168.10.2  Bcast:192.168.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14445402 errors:0 dropped:0 overruns:0 frame:0
          TX packets:15577001 errors:0 dropped:0 overruns:1 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:
3252586852
 (3101.9 Mb)  TX bytes:1789650943 (1706.7 Mb)
          Interrupt:11 Base address:0x7000
eth1      Link encap:Ethernet  HWaddr 00:02:B3:2E:6B:61
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:9195375 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5463427 errors:0 dropped:0 overruns:23 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:
3644100441
 (3475.2 Mb)  TX bytes:
4127104108
 (3935.9 Mb)
          Interrupt:11 Base address:0xf000
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:1137 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1137 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:89469 (87.3 Kb)  TX bytes:89469 (87.3 Kb)
ppp0      Link encap:Point-to-Point Protocol
          inet addr:194.185.53.52  P-t-P:81.174.0.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:2602494 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2805056 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:939267974 (895.7 Mb)  TX bytes:2130321650 (2031.6 Mb)
iptables č:
[root@localhost user01]# /etc/init.d/iptables status
Table: mangle
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
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
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
Table: filter
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
Table: nat
Chain PREROUTING (policy ACCEPT)
target     prot opt source               destination
DNAT       tcp  --  anywhere             194-185-53-52.f5.ngi.ittcp dpt:85
to:192.168.1.10
1:85
Chain POSTROUTING (policy ACCEPT)
target     prot opt source               destination
MASQUERADE  all  --  anywhere             anywhere
Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
Ciao
Mario

Ciao,
credo tu abbia sbagliato newsgroup, dovresti postare il tuo problema a
it.comp.os.linux.networking :)
CiaoCiao
  Sergio "33%"

 
http://192.168.0.101
questo lo devi cmq provare dall'esterno... e poi ricordati
che lo hai nattato sulla porta 85!!
-- 
L'unica cosa certa è che non esiste nulla di certo...