Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
iptables port redirecting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
WyriHaximus
n00b
n00b


Joined: 08 Jan 2004
Posts: 56
Location: koedijk(alkmaar), The Netherlands

PostPosted: Sun Jul 31, 2005 1:28 pm    Post subject: iptables port redirecting Reply with quote

Hi,

I want to route all traffic thats incoming on eth0 on port 21 to eth0 100. How do I do that with iptables?

Grtz,

WyriHaximus
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Sun Jul 31, 2005 2:10 pm    Post subject: Reply with quote

Code:
iptables -A PREROUTING -d $LOCAL_IP -p tcp --dport 22 -j REDIRECT --to-ports 100

See man iptables for details
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum