Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
problema con iptables PREROUTING/POSTROUTING [ RESUELTO ]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Spanish
View previous topic :: View next topic  
Author Message
theme
Tux's lil' helper
Tux's lil' helper


Joined: 14 Oct 2003
Posts: 75
Location: Barcelona--> Catalunya--> Spain

PostPosted: Fri Oct 31, 2003 11:56 am    Post subject: problema con iptables PREROUTING/POSTROUTING [ RESUELTO ] Reply with quote

Hola estoy intentando hacer nat pero no puedo entrar las reglas a la tabla nat.

tengo los siguientes modulos cargados:

Quote:

#lsmod

iptable_mangle
iptable_filter
ipt_LOG
iptable_nat
ip_conntrack
ip_tables


y entro el siguiente comando:
Code:
iptables -t nat -A PREROUTING -i eth0 --dport 80 -j DNAT --to-destination 192.168.1.2:80


i me contesta:
Quote:
iptables: Invalid argument


Alguien me puede ayudar?
Ya no se que hacer!!! :(


Last edited by theme on Sat Nov 01, 2003 11:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
nohuman
Apprentice
Apprentice


Joined: 14 Jun 2003
Posts: 160
Location: Valencia

PostPosted: Fri Oct 31, 2003 5:31 pm    Post subject: Reply with quote

Hola!

Yo monto nat asi:
Code:

#!/bin/bash
echo Montando NAT
/sbin/modprobe iptable_nat
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward


Siendo eth0 la tarjeta conectada a internet

Un Saludo
Back to top
View user's profile Send private message
theme
Tux's lil' helper
Tux's lil' helper


Joined: 14 Oct 2003
Posts: 75
Location: Barcelona--> Catalunya--> Spain

PostPosted: Sat Nov 01, 2003 11:42 pm    Post subject: Reply with quote

:? Curioso :wink: La verdad es que no se como pero ya me funciona.

Lo hago :

Code:
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-destination $IP_PUB


De todos modos hechare un vistazo a esto del masquerade, pero a primera vista no he visto el comando "masquerade"
Back to top
View user's profile Send private message
oCHARLIEo
Guru
Guru


Joined: 06 Oct 2003
Posts: 303
Location: Madrid

PostPosted: Mon Nov 03, 2003 1:24 pm    Post subject: Reply with quote

El masquarade se puede aplicar con:
Code:

iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth1 -j MASQUERADE

_________________
Las Mujeres son malvadas, retorcidas, perversas... pero huelen tan bien...

Por un foro ordenado y un buscador más útil:
[TEMA] Descripción problema (estado)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Spanish 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