Talk About Network

Google





Software > Linux Debian Maint Firewall > Re: DNAT TCP 12...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 13 Topic 1561 of 1645
Post > Topic >>

Re: DNAT TCP 12345 -> 22

by "=?ISO-8859-1?Q?M=E1rcio_H._Parreiras?=" <mhp@[EMAIL PROTECTED] > Mar 21, 2008 at 12:50 AM

------=_Part_1887_6162716.1206056522508
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Try the rules below, simple and clean:

EXT_IF=3D'eth1'    # the interface connected to Internet
SERVER=3D'192.168.0.1'    # or any else IP allocated to machine
SSH=3D'22'
SSH_SERVER=3D'12345'    # or another ****t you want
$IPTABLES -t nat -A PREROUTING -i $EXT_IF -p tcp --d****t $SSH_SERVER -j
DNA=
T
--to $SERVER:$SSH
$IPTABLES -t filter -A FORWARD -i $EXT_IF -p tcp --d****t $SSH -d $SERVER
-j
ACCEPT

note: server's sshd may listen on ****t 22 only.

Regards,

--=20
M=E1rcio H. Parreiras @[EMAIL PROTECTED]
 Pedro Leopoldo - MG - Brazil


**** favor evite enviar-me anexos Excel (.xls), PowerPoint (.ppt) ou Word
(.doc);
Veja http://www.gnu.org/philosophy/no-word-attachments.pt.html

Please avoid sending me Excel (.xls), PowerPoint (.ppt) or Word (.doc)
attachments;
See http://www.gnu.org/philosophy/no-word-attachments.html


Navegue com seguran=E7a: http://br.mozdev.org

Surf safely: http://www.mozilla.com/en-US


Experimente http://www.broffice.org

Try http://www.openoffice.org


"A caixa dizia: Requer MS Windows ou superior, ent=E3o eu instalei
Debian/G=
NU
Linux!"
http://www.debian.org/index.pt.html

"The box said: Requires MS Windows or better, then I installed Debian/GNU
Linux!"
http://www.debian.org/index.en.html


http://pt.wikipedia.org/wiki/Linux

http://en.wikipedia.org/wiki/Linux


Codifica=E7=E3o de caracteres / Character encoding: Unicode (UTF-8)
..

------=_Part_1887_6162716.1206056522508
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Try the rules below, simple and clean:<br><br>EXT_IF=3D&#39;eth1&#39;
&nbsp=
;&nbsp; # the interface connected to Internet<br>SERVER=3D&#39;<a
href=3D"h=
ttp://192.168.0.1">192.168.0.1</a>&#39;&nbsp;&nbsp;&nbsp; # or any else IP
=
allocated to machine<br>SSH=3D&#39;22&#39;<br>
SSH_SERVER=3D&#39;12345&#39;&nbsp;&nbsp;&nbsp; # or another ****t you
want<b=
r>$IPTABLES -t nat -A PREROUTING -i $EXT_IF -p tcp --d****t $SSH_SERVER -j
D=
NAT --to $SERVER:$SSH<br>$IPTABLES -t filter -A FORWARD -i $EXT_IF -p tcp
-=
-d****t $SSH -d $SERVER -j ACCEPT<br>
<br>note: server&#39;s sshd may listen on ****t 22
only.<br><br>Regards,<br>=
<br>-- <br>M=E1rcio H. Parreiras @[EMAIL PROTECTED]
 Pedro Leopoldo - MG -
Brazil<br><br><br>=
**** favor evite enviar-me anexos Excel (.xls), PowerPoint (.ppt) ou Word
(.=
doc);<br>
Veja <a
href=3D"http://www.gnu.org/philosophy/no-word-attachments.pt.html">=
http://www.gnu.org/philosophy/no-word-attachments.pt.html</a><br><br>Please=
 avoid sending me Excel (.xls), PowerPoint (.ppt) or Word (.doc)
attachment=
s;<br>
See <a
href=3D"http://www.gnu.org/philosophy/no-word-attachments.html">http=
://www.gnu.org/philosophy/no-word-attachments.html</a><br><br><br>Navegue
c=
om seguran=E7a: <a
href=3D"http://br.mozdev.org">http://br.mozdev.org</a><b=
r>
<br>Surf safely: <a
href=3D"http://www.mozilla.com/en-US">http://www.mozill=
a.com/en-US</a><br><br><br>Experimente <a
href=3D"http://www.broffice.org">=
http://www.broffice.org</a><br><br>Try
<a
href=3D"http://www.openoffice.org=
">http://www.openoffice.org</a><br>
<br><br>&quot;A caixa dizia: Requer MS Windows ou superior, ent=E3o eu
inst=
alei Debian/GNU Linux!&quot;<br><a
href=3D"http://www.debian.org/index.pt.h=
tml">http://www.debian.org/index.pt.html</a><br><br>&quot;The
box said:
Req=
uires MS Windows or better, then I installed Debian/GNU Linux!&quot;<br>
<a
href=3D"http://www.debian.org/index.en.html">http://www.debian.org/index=
..en.html</a><br><br><br><a
href=3D"http://pt.wikipedia.org/wiki/Linux">http=
://pt.wikipedia.org/wiki/Linux</a><br><br><a
href=3D"http://en.wikipedia.or=
g/wiki/Linux">http://en.wikipedia.org/wiki/Linux</a><br>
<br><br>Codifica=E7=E3o de caracteres / Character encoding: Unicode
(UTF-8)=
<br>.

------=_Part_1887_6162716.1206056522508--


-- 
To UNSUBSCRIBE, email to debian-firewall-REQUEST@[EMAIL PROTECTED]
 a subject of "unsubscribe". Trouble? Contact
listmaster@[EMAIL PROTECTED]

 




 13 Posts in Topic:
DNAT TCP 12345 -> 22
=?ISO-8859-15?Q?Fr=E9d=E9  2008-03-20 20:30:18 
Re: DNAT TCP 12345 -> 22
Ansgar -59cobalt- Wiecher  2008-03-20 22:10:12 
Re: DNAT TCP 12345 -> 22
=?ISO-8859-1?Q?Fr=E9d=E9r  2008-03-21 12:20:09 
Re: DNAT TCP 12345 -> 22
Ansgar -59cobalt- Wiecher  2008-03-21 14:50:12 
Re: DNAT TCP 12345 -> 22
"Stephen Benoit (Lin  2008-03-20 22:40:11 
Re: DNAT TCP 12345 -> 22
"=?ISO-8859-1?Q?M=E1  2008-03-21 00:50:12 
Re: DNAT TCP 12345 -> 22
=?ISO-8859-1?Q?Fr=E9d=E9r  2008-03-21 12:40:18 
Re: DNAT TCP 12345 -> 22
=?ISO-8859-1?Q?Fr=E9d=E9r  2008-03-21 12:40:10 
Re: DNAT TCP 12345 -> 22
"Chris Henry" &  2008-03-21 13:20:12 
Re: DNAT TCP 12345 -> 22
=?ISO-8859-1?Q?Fr=E9d=E9r  2008-03-21 12:50:11 
Re: DNAT TCP 12345 -> 22
Pascal Hambourg <pasca  2008-03-21 14:00:26 
Re: DNAT TCP 12345 -> 22
=?ISO-8859-15?Q?Fr=E9d=E9  2008-03-21 20:50:24 
Re: DNAT TCP 12345 -> 22
Paolo <oopla@[EMAIL PR  2008-03-21 23:30:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 9:09:30 PST 2009.