LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Internal network connecting to external IP address (https://www.linuxquestions.org/questions/linux-networking-3/internal-network-connecting-to-external-ip-address-520182/)

kamafeu 01-17-2007 10:44 AM

Internal network connecting to external IP address
 
hi, i have a small network setup with two computers running Fedora Core 5, one is my home gateway and the other one my workstation, i've setup NAT and MASQUERADE, so i can access the internet through the gateway and everything is working fine, but now im running some services in my workstation and had to setup port forwarding so i could reach them from outside, it works good but i cant access those same services from the internal network.

Can someone tell me how can i allow the internal network to access the public IP address of gateway and be forward back the same way as external connections are?


thanks in advance,

kamafeu

ramram29 01-17-2007 11:33 AM

Sounds like you need to add a rule to allow all LAN hosts to access your port. For example, to allow LAN hosts access to your web server port 80:

iptables -A INPUT -s $LAN -d $NIC1 --dport 80 -j ACCEPT
iptables -A OUTPUT -s $NIC1 --sport 80 -d $LAN -j ACCEPT

kamafeu 01-21-2007 01:23 PM

thx for the reply, i managed to do what i wanted by using the /etc/hosts file.


All times are GMT -5. The time now is 01:38 AM.