Mailinglist Archive: opensuse-security (359 mails)

< Previous Next >
Port Forward -For cams-
  • From: "Hipólito A. González M." <hgonzale@xxxxxxxxxxxxxxx>
  • Date: Tue, 29 Jul 2003 10:29:17 -0400
  • Message-id: <3F2684BD.6090607@xxxxxxxxxxxxxxx>
I installed to Linux with iptables in two office
The linux are router with iptables (Ipmasq), Squid, DNS, Firewall and Samba.

All is good, but before, They had one computer in each office conected to internet with Real IP, and a card-pci for cams. From the another office, with the Eclipse software (for windows), you put the another IP and you can see the cams in the another office. All is good. and viceversa.

Now, I install the linux for sharing the internet in both office, and I want to do an ip forward.
Tha manual said: Port 10008, but not TCP or UDP. Only said it.

Tha linux boxes has two NIC, one for the internal network and another to the external network.

Internal in both places: 192.168.0.0/24

I put it in my firewall script:


iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 0/0 -j MASQUERADE
iptables -t filter -A FORWARD -p tcp -s 192.168.0.0/24 -d 0/0 --dport 80 -j DROP
iptables -t nat -A PREROUTING -i eth0 (external nic) -p tcp -s (other office's IP) -d (mi real) --dport 10008 -j DNAT --to-destination 192.168.0.2 (internal IP to the computer with Eclipse software)
iptables -t nat -A PREROUTING -i eth0 (external nic) -p upd -s (other office's IP) -d (mi real) --dport 10008 -j DNAT --to-destination 192.168.0.2 (internal IP to the computer with Eclipse software)

But it doesn't work.

I try too:

iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -d 0/0 -j MASQUERADE
iptables -t filter -A FORWARD -p tcp -s 192.168.0.0/24 -d 0/0 --dport 80 -j DROP
iptables -t nat -A PREROUTING -i eth0 (external nic) -s (other office's IP) -d (mi real) -j DNAT --to-destination 192.168.0.2 (internal IP to the computer with Eclipse software)

I am forwarding all, and the packets are sent in the anohter office to the internal computer, But I belive that the internal computer is not answering.

What is happening?
Any idea?
Thank you!!!




< Previous Next >
References