IPTables Undesired NATing
Hello all,
I've got two network segments which I'm trying to separate with an iptables router / packet filter. This is my first real exposure to iptables (though lots of experience with other networking & firewall products), so the syntax and concepts are still a bit grey. If it matters, I'm using iptables-1.2.11-3.1.FC3. The problem I'm experiencing is, iptables seems to be NATing traffic, when I want it to just forward/route. INTERNET====NET1====IPTABLES====NET2 Example Interfaces (not actually addresses): NET2 Device: 10.0.1.2/24 IPTables - NET2 Inteface: 10.0.1.1/24 IPTables - NET1 Inteface: 10.0.0.200/24 For example: 10.0.1.2 tries to get to the Internet...and does, however all traffic beyond 10.0.1.x is seen with a source address of 10.0.1.1. Despite that, pretty much all connectivity is working (in both directions). It seems as though it will hide the 'source' IP from the 'destination' network, but not vice versa. If I ping 10.0.1.2 from 10.0.0.x, I'll get replies, and the sniffer shows up the correct source, however if 10.0.1.2 generates traffic to 10.0.0.x, it will show up as 10.0.1.1. I just want to see all addresses on both sides. I don't even have a nat table, so I don't understand why it's doing it. I'll post my ip-tables config, with the substituted IP addresses. eth0 = NET1 eth1 = NET2 Any assistance you can provide would be most appreciated. Thanks in advance. Code:
*filter |
It doesn't look like you have any rules that would SNAT or Masquerade. Are you sure you don't have any rules in the NAT table? Check "iptables -t nat -L" to be sure.
|
SOLVED
That was the problem...thanks.
I checked it and found this: Code:
# iptables -t nat -L Code:
iptables -t nat --flush Thanks again. |
I beleive you should also do an "iptables-save" to save your current configuration. If you reboot for any reason your old configuration will more than likely be read in and you may be back where you started.
The "iptables-restore" actually reads the previously saved tables. That is why restoring would not have worked. |
All times are GMT -5. The time now is 03:21 AM. |