2
I have a network topology:
[C1] - [R1] - [R2] - [C2]
C1-R1 network is 192.168.100.0/24
R1-R2 network is 10.9.8.0/30
R2-C2 network is 192.168.200.0/24
What I need to do is to make C2 be able to connect with C1 by applying some iptables rules to R2. At the same time I don't want C1 to connect to C2. I tried coining some FORWARD chain rules but I just can't get it working.
Is there a simple way to get it working?
Here what iptables -L -v says:
Chain INPUT (policy DROP 5 packets, 372 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy DROP 4 packets, 240 bytes)
pkts bytes target prot opt in out source destination
5 420 REJECT all -- any enp0s3 anywhere anywhere
state NEW reject-with icmp-port-unreachable
Chain OUTPUT (policy DROP 5 packets, 560 bytes)
pkts bytes target prot opt in out source destination
3When you say C1 needs to "connect" to C2, what do you mean exactly? Are you going to be using a protocol like TCP or UDP? TCP inherently needs to be able to send return traffic. – heavyd – 2015-04-25T16:16:09.833
All of your chains have policy DROP, therefore no packets are ever forwarded. You can either change the policies to ACCEPT or add allow rules. – user49740 – 2015-04-25T16:48:16.943