Loopback Connections: conection refused to my domain on port
Hi to all.
Iīm facing a problem just like the one described in http://www.dyndns.com/support/kb/loo...nnections.html. I have my domain configured correctly at dyndns. I also have another virtual machine (using openvz) configured as a mail server. From outside the network i have all the serveices available via example.com. From my internal network i can ping mydomain.com, but when i try to netcat to port 25, it give me "Connection refused", but from outside the network i can conect. Code:
example.com [xxx.xxx.xxx.xxx] 143 (imap2) : Connection refused this is the script that i use to initialize my iptables rules Code:
iptables -F |
Try putting an entry in your /etc/hosts file for the domain and see if it resolves the problem. For example, if dyndns is set up to forward mail.mydomain.com to your router, which is port forwarding to 192.168.1.104 (as in your example above), put an entry in the hosts file on the client machine mapping mail.mydomain.com to 192.168.1.104.
|
I was wondering if it is possible to do that only using iptables rules.
|
It's not really an iptables function. DynDNS is reporting your external IP address, which is what anyone external to your network will need to access the server. Internally, you just need to know the internal IP address. As an analogy, it's like going from Philadelphia to New York by way of Alaska.
If you do: Code:
nc 192.168.1.104 25 |
Quote:
Quote:
Because i have a mail server, web server, dhcp server and some dhcp clients. Itīs like a home network for my all family. By the way, this rules works for some hosts and for other donīt: Code:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 143 -j DNAT --to-dest 192.168.1.104 |
Quote:
Quote:
Quote:
Quote:
It's like an office phone system where everyone has their own extension. People inside the office can talk to each other simply by dialing the extension directly, while people outside the office have to dial the main number and get transferred to the right extension. Using the DynDNS IP address for the local clients is like having the people inside the office dial out to the office main number and get transferred to the extension they want to call rather than just dialing the extension. |
All times are GMT -5. The time now is 11:40 AM. |