summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-discuss/2012-August/008637.html
blob: 3736320e07501a997c85e5e04124b3d6f4d9fa9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
 <HEAD>
   <TITLE> [Mageia-discuss] Setting up a port forward
   </TITLE>
   <LINK REL="Index" HREF="index.html" >
   <LINK REL="made" HREF="mailto:mageia-discuss%40mageia.org?Subject=Re%3A%20%5BMageia-discuss%5D%20Setting%20up%20a%20port%20forward&In-Reply-To=%3C20120831120448.GA10504%40bkor.dhs.org%3E">
   <META NAME="robots" CONTENT="index,nofollow">
   <META http-equiv="Content-Type" content="text/html; charset=us-ascii">
   <LINK REL="Previous"  HREF="008638.html">
   <LINK REL="Next"  HREF="008641.html">
 </HEAD>
 <BODY BGCOLOR="#ffffff">
   <H1>[Mageia-discuss] Setting up a port forward</H1>
    <B>Olav Vitters</B> 
    <A HREF="mailto:mageia-discuss%40mageia.org?Subject=Re%3A%20%5BMageia-discuss%5D%20Setting%20up%20a%20port%20forward&In-Reply-To=%3C20120831120448.GA10504%40bkor.dhs.org%3E"
       TITLE="[Mageia-discuss] Setting up a port forward">olav at vitters.nl
       </A><BR>
    <I>Fri Aug 31 14:04:48 CEST 2012</I>
    <P><UL>
        <LI>Previous message: <A HREF="008638.html">[Mageia-discuss] Setting up a port forward
</A></li>
        <LI>Next message: <A HREF="008641.html">[Mageia-discuss] Setting up a port forward
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#8637">[ date ]</a>
              <a href="thread.html#8637">[ thread ]</a>
              <a href="subject.html#8637">[ subject ]</a>
              <a href="author.html#8637">[ author ]</a>
         </LI>
       </UL>
    <HR>  
<!--beginarticle-->
<PRE>On Fri, Aug 31, 2012 at 12:41:37PM +0100, Anne Wilson wrote:
&gt;<i> I need to set up ssh in such a way that it comes in on a high port,
</I>&gt;<i> say 5122 which is forwarded to 22 - or otherwise to have ssh listen on
</I>&gt;<i> 5122.  I assume this is beyond MCC, and will entail editing iptables.
</I>&gt;<i>  This is not something I'm familiar with.  Can someone please advise me?
</I>
I have in /etc/sysconfig/iptables:
# 1;3S
# Generated by iptables-save v1.3.3 on Wed Nov 16 17:30:45 2005
*nat
:<i>PREROUTING ACCEPT [0:0]
</I>:<i>POSTROUTING ACCEPT [0:0]
</I>:<i>OUTPUT ACCEPT [0:0]
</I>-A PREROUTING -i eth0 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 22
-A PREROUTING -i eth0 -p tcp -m tcp --dport 53 -j REDIRECT --to-ports 22
COMMIT
# Completed on Wed Nov 16 17:30:45 2005
# Generated by iptables-save v1.3.3 on Wed Nov 16 17:30:45 2005



or as iptables command:
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp \
         --dport 443 -j REDIRECT --to-ports 22

that redirect tcp port 443 to 22 (loads of proxies allow you to CONNECT
to 443, but not to 22).

-- 
Regards,
Olav
</PRE>




<!--endarticle-->
    <HR>
    <P><UL>
        <!--threads-->
	<LI>Previous message: <A HREF="008638.html">[Mageia-discuss] Setting up a port forward
</A></li>
	<LI>Next message: <A HREF="008641.html">[Mageia-discuss] Setting up a port forward
</A></li>
         <LI> <B>Messages sorted by:</B> 
              <a href="date.html#8637">[ date ]</a>
              <a href="thread.html#8637">[ thread ]</a>
              <a href="subject.html#8637">[ subject ]</a>
              <a href="author.html#8637">[ author ]</a>
         </LI>
       </UL>

<hr>
<a href="https://www.mageia.org/mailman/listinfo/mageia-discuss">More information about the Mageia-discuss
mailing list</a><br>
</body></html>