Results 1 to 5 of 5
We're using both SuSe and RHEL servers. Our servers are running behind firewall device and remote root login is disabled in SSH.
We're using NAT.
Remote client connections including failed ...
- 09-15-2010 #1Just Joined!
- Join Date
- Sep 2010
- Posts
- 3
How to log remote or external ip address of remote clients
We're using both SuSe and RHEL servers. Our servers are running behind firewall device and remote root login is disabled in SSH.
We're using NAT.
Remote client connections including failed logins are logged into the /var/log/messages but what is logged are gateway ip of our LAN - the LAN IP of Firewall device.
How can I logged the external or public IP of the remote client?
- 09-15-2010 #2Just Joined!
- Join Date
- Aug 2010
- Posts
- 89
It seem your nat is not done correctly, else you'll see the external IP in the log.
For external incomming connection, you should have something like :
iptables -t nat -A PREROUTING -d YourFirewallExternalEthIP --dport 22 -j DNAT --to-dest YourLanServerIp
If you got a changed source address, you probably had some SNAT wrong
- 09-19-2010 #3Just Joined!
- Join Date
- Sep 2010
- Posts
- 3
HI,
Hi thanks for the command, I got this error executing that command:
In RHEL
iptables v1.3.5: Unknown arg `--dport'
In SUSE
iptables v1.4.0: Unknown arg `--dport'
Thanks,
- 09-20-2010 #4Just Joined!
- Join Date
- Aug 2010
- Posts
- 89
Sorry, I type too fast... to use dport (destination port) you need to select tcp or udp protocol, so add : -p tcp after PREROUTING
- 09-29-2010 #5Just Joined!
- Join Date
- Sep 2010
- Posts
- 3
Thanks for the help. My problem is resolved. iptalbes is not applicable to our server because we're not using it. I just disable the MASQ in our firewall device.
Thanks,


Reply With Quote