LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-19-2012, 02:16 PM   #16
Treikayan
Member
 
Registered: Oct 2008
Location: Albany Park, Chicago IL
Distribution: RHEL 5.1 i386
Posts: 75

Original Poster
Rep: Reputation: 15

Quote:
Originally Posted by acid_kewpie View Post
Ahh, there is a reject at the bottom of the RH-Firewall-1-INPUT chain, so once that chain is referenced by FORWARD, you'll never come back to the subsequent rules. put yours above those lines.
Hi Chris. I just want to be clear. Put the "Reference chain in FORWARD" below the chains I added there?
 
Old 02-19-2012, 02:33 PM   #17
Treikayan
Member
 
Registered: Oct 2008
Location: Albany Park, Chicago IL
Distribution: RHEL 5.1 i386
Posts: 75

Original Poster
Rep: Reputation: 15
Thank you dear sir. Your steps and knowledge have helped me in, not only understanding the chains and tables better in iptables, but also understanding how the PREROUTING and POSTROUTING work.

One more question. What exactly is being MASQUERADED in the post routing. I'm still a little unclear with this.

Once again, thank you. Remote Desktop sucessfully works!
 
Old 02-19-2012, 02:47 PM   #18
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
masquerading is just a short hand for natting to the address of the outbound interface. Saves attaching a dedicated IP for the nat. etc. From the windows boxes perspective, it's the IP of the Linux box that it sees.
 
Old 02-19-2012, 08:48 PM   #19
Treikayan
Member
 
Registered: Oct 2008
Location: Albany Park, Chicago IL
Distribution: RHEL 5.1 i386
Posts: 75

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by acid_kewpie View Post
masquerading is just a short hand for natting to the address of the outbound interface. Saves attaching a dedicated IP for the nat. etc. From the windows boxes perspective, it's the IP of the Linux box that it sees.
Ok, yep, I just purposely failed a login to Remote Desktop to see how it shows up. Yep, the Linux server IP shows up as the source IP. Is there a way to audit on the Linux side what the actual public IP is? Yes, I've controlled the source networks in the Forwarding, but it still would be nice to know which IPs are accessing Remote Desktop.

Thanks again.
 
Old 02-20-2012, 03:02 AM   #20
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
sure, you can use a LOG target (or a ULOG one for more userspace interaction) to record new hits for the FORWARD action. Just copy the line you have in FORWARD, put it above the existing on, and change the target to -j LOG

Again note that if the windows box was only ever able to reach your router via the Linux box and was on a different subnet only joined at that Linux server, then there would be no need to MASQ the traffic and you'd have full visibility of the source IP on the windows box.

Last edited by acid_kewpie; 02-20-2012 at 03:04 AM.
 
Old 02-21-2012, 08:34 PM   #21
Treikayan
Member
 
Registered: Oct 2008
Location: Albany Park, Chicago IL
Distribution: RHEL 5.1 i386
Posts: 75

Original Poster
Rep: Reputation: 15
Chris, thanks again. Logs are working beautifully!

I've updated /etc/syslog.conf to handle kernel.warnings and put the logs in rotation /etc/logwatch.d/iptables.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirect traffic coming on one port to port of another server vikas027 Linux - Software 2 11-12-2011 12:28 PM
Redirect incoming traffic to an other port (ubuntu openvpn server) krisox Linux - Newbie 3 12-06-2010 12:22 AM
[HELP] redirect traffic to spesific port based on Traffic Content using iptables summersgone Linux - Server 2 06-22-2009 11:26 AM
how to redirect squid traffic to a specific nic card scream Linux - Newbie 0 03-08-2009 03:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration