Please take a look at to this routing table:
Code:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
212.200.191.127 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
93.92.248.248 0.0.0.0 255.255.255.248 U 0 0 0 eth0
5.2.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth1
0.0.0.0 0.0.0.0 0.0.0.0 U 0 0 0 ppp0
[root@main ~]#
I have problem with port forwarding. I was already everythig setted but it doesnt work:
In iptables I was put the following:
Code:
iptables -A PREROUTING -t nat -i eth1 -p tcp --dport 80 -j DNAT --to 192.168.1.50:80
iptables -A INPUT -p tcp -m state --state NEW --dport 80 -i eth1 -j ACCEPT
and setted ip_forwarding=1.
Last thing I want to check is routing table.
Is this routing table OK?
My static ip is x.x.x.12 this is an ADSL modem with pppoe connection. If I type command ifconfig I get:
Code:
eth0 Link encap:Ethernet HWaddr 00:11:6B:95:71:BB
inet addr:93.92.248.254 Bcast:93.92.248.255 Mask:255.255.255.248
inet6 addr: fe80::211:6bff:fe95:71bb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:38307 errors:0 dropped:0 overruns:0 frame:0
TX packets:24768 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:44213971 (42.1 MiB) TX bytes:2887391 (2.7 MiB)
Interrupt:217 Base address:0xe000
eth1 Link encap:Ethernet HWaddr 00:19:99:54:BC:24
inet addr:5.2.2.70 Bcast:5.2.2.255 Mask:255.255.255.0
inet6 addr: fe80::219:99ff:fe54:bc24/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:25811 errors:0 dropped:0 overruns:0 frame:0
TX packets:36247 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:3077989 (2.9 MiB) TX bytes:43958319 (41.9 MiB)
Interrupt:169 Memory:df900000-df910000
ppp0 Link encap:Point-to-Point Protocol
inet addr:x.x.x.12 P-t-P:212.200.191.127 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1480 Metric:1
RX packets:267 errors:0 dropped:0 overruns:0 frame:0
TX packets:263 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:27838 (27.1 KiB) TX bytes:27245 (26.6 KiB)
Thank you!