Iptables command for allowing traffic across two subnets
Understanding that for any competent linux user this is likely an easy question.
Need to add a firewall rule to allow all traffic between two subnets: Src=192.168.4.0/24, Dst=192.168.1.0/24 srcport=ANY, dstport=ANY ALLOW Src=192.168.1.0/24, Dst=192.168.4.0/24 srcport=ANY, dstport=ANY ALLOW I am wondering if someone would be so kind to provide the exact command line syntax to make this above happen. Thanks in advance. Tazschic NOTE: 192.168.1.1 is on eth0 and 192.168.4.1 is on eth2 |
First of all, can you give us more information on what you are trying to do, a quick scenario will help us understand what you are trying to achieve.
What distro are you using? Are there any rules or scripts that you are currently using? without knowing this, you can run into all sorts of problems trying to trouble shoot, the more information you can give, the better we can help. To help with you question, When you have 2 network cards you need to turn port-forwarding on in the kernel, most distro will have this turned off be default, try: Quote:
Quote:
|
You'll need to make that a permanent setting or it'll disappear at next boot.
Edit /etc/sysctl.conf net.ip4.ip_forward = 1 |
All times are GMT -5. The time now is 06:23 PM. |