Reply To: [SOLVED] Accesing local servers using the domain name.

Home Page Forums Network Management ZeroShell [SOLVED] Accesing local servers using the domain name. Reply To: [SOLVED] Accesing local servers using the domain name.

#50336

rsansores
Member

Thanks again atheling, in fact I have those lines:

After executing iptables -t nat -vn -L :



Chain PREROUTING (policy ACCEPT 531K packets, 40M bytes)
pkts bytes target prot opt in out source destination
1910 105K DNAT tcp -- ETH01 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 to:192.168.2.2:80
3287 197K DNAT tcp -- ETH01 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:21 to:192.168.2.2:21
59 3180 DNAT tcp -- ETH01 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8100 to:192.168.2.2:8100
0 0 DNAT udp -- ETH01 * 0.0.0.0/0 0.0.0.0/0 udp dpt:8100 to:192.168.2.2:8100
0 0 DNAT tcp -- ETH01 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:600 to:192.168.2.95:600
0 0 DNAT udp -- ETH01 * 0.0.0.0/0 0.0.0.0/0 udp dpt:600 to:192.168.2.95:600
28 1680 DNAT tcp -- ETH01 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:54352 to:192.168.2.2:54352
8 412 DNAT tcp -- ETH01 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 to:192.168.2.2:443
11030 554K Proxy tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
49 2712 DNAT tcp -- ETH01 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:3690 to:192.168.2.2:3690

Chain POSTROUTING (policy ACCEPT 463 packets, 29185 bytes)
pkts bytes target prot opt in out source destination
377K 26M SNATVS all -- * * 0.0.0.0/0 0.0.0.0/0
371K 26M MASQUERADE all -- * ETH01 0.0.0.0/0 0.0.0.0/0
5585 367K MASQUERADE all -- * ETH02 0.0.0.0/0 0.0.0.0/0
0 0 MASQUERADE all -- * ETH00 0.0.0.0/0 0.0.0.0/0
0 0 MASQUERADE all -- * ETH03 0.0.0.0/0 0.0.0.0/0
21 1430 custom_postroute all -- * * 0.0.0.0/0 0.0.0.0/0 state NEW
18 1237 custom_postroute all -- * * 0.0.0.0/0 0.0.0.0/0 state NEW
18 1237 custom_postroute all -- * * 0.0.0.0/0 0.0.0.0/0 state NEW

Chain OUTPUT (policy ACCEPT 172K packets, 14M bytes)
pkts bytes target prot opt in out source destination

Chain Proxy (1 references)
pkts bytes target prot opt in out source destination

Chain SNATVS (1 references)
pkts bytes target prot opt in out source destination

Chain custom_postroute (3 references)
pkts bytes target prot opt in out source destination
0 0 MASQUERADE all -- * * 192.168.2.0/24 192.168.2.2
0 0 MASQUERADE all -- * * 192.168.2.0/24 192.168.2.2
0 0 MASQUERADE all -- * * 192.168.2.0/24 192.168.2.2
0 0 MASQUERADE all -- * * 192.168.2.0/24 192.168.2.2

The duplicity maybe is because I executed more than one time the three comands that you provide me. 😳 (I will do some research about iptables to discover how to erease the extra lines but if Im not wrong that should not interfeer cause the lines are excecuted from up to down)…

Anyway this is still not working, Im facing the same behavior of the first post. I missing something? If you need any log to get a better lanscape of my configuration just ask, I really apreciate the time you are consuming in helping me.

After reading and reading and reading more and more tutorials I found a guy that creates a postroute rule using the plublic ip instead the local subnet but I think that do not apply to me cause I have a dinamic public ip.