Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-27-2005, 02:44 PM
|
#1
|
LQ Newbie
Registered: Jul 2005
Posts: 1
Rep:
|
NAT- ssh Firewall Issue
First of all, I am a newbie to Linux. I am using a Linux box as a firewall. I have the following set up:
Linux box 2 nic's: NIC #1 has 2 Public addresses (Used for NAT), NIC #2 Private going into a fastHub.
Windows box behind firewal with only a public address.
Linux is providing NAT on NIC#1.1 for the private address on Win box
Problem: Based on my firewall configurations I am allowing ssh to NIC# 1 from a specific LAN PC, but it will not allow me to ssh through Linux firewall to Window PC.
NATing is working.
My forward config is as follows:
IPTABLES -A FORWARD -p tcp -s public/32 -d private/32 --dport 22 -j ACCEPT
Please advice.
Thx
Moe
|
|
|
07-27-2005, 02:47 PM
|
#2
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep: 
|
You would need to portforward to ssh in to boxes behind the firewall (I assume this is what you want).
|
|
|
07-27-2005, 04:20 PM
|
#3
|
LQ Newbie
Registered: Jan 2003
Location: Cymru Wales)
Distribution: Debian (Sarge & Sid)
Posts: 21
Rep:
|
Have you really got an ssh server running on your windows box?
I've had them running but found them flaky!
Anyway, you need port forwarding aka inbound NAT.
You need to specify that inbound traffic to say port 222 at the firewall is forwarded to port 22 of your internal computer's IP address.
Not sure what the iptables voodoo looks like off the top of my head, however you know what to google for now.
|
|
|
07-27-2005, 04:25 PM
|
#4
|
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507
Rep: 
|
Port forwarding with iptables is more or less just:
Code:
EXT_IF=eth1 #external interface
INTERNAL_BOX=192.168.0.5 #box running sshd
/sbin/iptables -A FORWARD -i $EXT_IF -p tcp --dport 22 -j ACCEPT
/sbin/iptables -t nat -A PREROUTING -p tcp --dport 222 -j DNAT --to $INTERNAL_BOX:22
|
|
|
All times are GMT -5. The time now is 06:58 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|