I give up and need help! I won't add to the confusion by showing all the combinations I have tried unsuccessfully... and yes, I've read FAQ2 and FAQ2a many times!
When googling the subject of this post there are many answers that boil down to using the same three iptables rules, two of which use nat. I won't repeat them here. I don't want to risk mixing raw iptables and shorewall rules on my production (two interface) firewall, so I need to achieve the same or better using just shorewall. I accept this is generally not a good idea on a firewall, but a general solution would be useful on other kinds of linux host that can run shorewall. A simple example would be to run a web server under a safe user account, listening on port 8080, but allowing clients to access the web server via port 80. My situation is unconventional, but very similar to the general case. I have a rogue web client (not sure if it is buggy software or malware) that occasionally tries to connect to my firewall's snat external ip address on port 80. The syn's are rejected by my default policy "all all REJECT info" because there isn't an explicit rule to permit that traffic - and, besides, it should not be allowed! Unfortunately, wireshark on the firewall and netstat on the client don't give me enough information to track down the offending program. I have deployed a fake web server on the firewall (listening on port 8080 and running under a unprivileged account) whose only purpose is to log the http headers after the rogue connection is established. I tried using REDIRECT, but had trouble stopping it intercepting all legitimate external web accesses. I also had trouble specifying the target port and address. ACCEPT doesn't seem to allow me to remap the port. The raw iptables solution seems to use nat, presumably because the nat PREROUTING target can remap the port - I don't need to change the target ip address. Have I overlooked something simple? I'm asking for help because I've just realised I'm going in circles! Thanks for your patience, Brian ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60134071&iu=/4140/ostg.clktrk _______________________________________________ Shorewall-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-users
