Help connecting two Lan's on same server with IPTABLES
Hi all,
I need sharing folders and other gadgets to work betwen only 2 PC's on different LANs that are connected to same Linux SERVER running IPTABLES. The layout: 192.168.0.255 .... ----- PC01 -- PC02 -- PC03 ----- | ....................................................................SERVER ===== 192.168.20.255 ...----- PC21 -- PC22 -- PC23 ------| I need to allow access only between IP_PC02 and IP_PC21 all ports. Can someone help with the IPTABLES rules please? Thanks Cip |
Re: Help connecting two Lan's on same server with IPTABLES
Quote:
|
No, the 2 PC's are windoze virused. I just wanna share resources of PC02 with PC21 and vice-versa (nothing to do with the server, u can only see it as a machine that has nics, Linux and iptables)and, by default, everything is closed between the two lans. I need to open everything between those 2 PC which are trusted. So i need the rules to be appended for communication between eth0 (192.168.0.255) and eth20 (192.168.20.255) on the server but ONLY for IP_PC02 and IP_PC21. I hope i explained better this time.
Thanks. Cip |
PS. And I need everything opened, all kind of traffic. Those PC's have the same user (person) used for testing pourposes and should behave like in the same lan.
Thanks again Cip |
basic FORWARD policy rules need to be applied like:
$iptables -P FORWARD DROP $iptables -A FORWARD -i eth0 -s $IP_PC21 -d $IP_PC02 -j ACCEPT $iptables -A FORWARD -i eth1 -s $IP_PC02 -d $IP_PC21 -j ACCEPT |
Thanks PiLgRiM.
Those are the rules I wrote myself in the firewall script (eth20 instead eth1 as I described the network). I thought there's something wrong with it. The problem is the PC's still don't see each other. Must be something else. I need go there and investigate. Thanks folks for the help. Cip |
Quote:
As in they don't see each other in Windows network neighbourhood or can't ping each other? |
Don't know yet. I am doing remote admin so i'll have to go there and see.
I was just trying to see if i did something wrong in iptables rules. Thanks |
All times are GMT -5. The time now is 08:41 AM. |