[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] nat i fedora11



Kristian Kallenberg skrev:

Citat af "Bent Bagger" <sslug@sslug>:

Ari Lehtonen wrote:
Tak, det er det jeg vil og har også prøvet det i forskellige varianter,
men jeg har nu nok lavet en fejl ved at NAT'e til 192.168.1.2 i
dedenstående figur.

Så skal du også være opmærksom på at Fedora muligvis har sine egne regler liggende i forvejen. Prøv med:

# iptables -L -t nat

For at se om der ligger noget i forvejen, og om standard politik er ACCEPT.

/kallenberg
Det lykkedes desværre ikke. Jeg får stadig fat i min web-server (apache) udefra.

Jeg har dhcp kørende på maskinen, som allokerer 168.192.1.1 til eth0 og fast ip-adresse 192.168.1.2 til den eksterne server på eth0.

Min rc.nat indeholder følgende og starter ved opstart:
------------------------------------------------------
# Defines the location of iptables executables
iptables=/sbin/iptables

#Clears if any old iptable rules/ policies are there
iptables --flush -t nat

# Now we will do Masquerading ie. we are doing NAT
/sbin/iptables --table nat --append POSTROUTING --out-interface ppp0 --jump MASQUERADE /sbin/iptables -A FORWARD -i ppp0 -o eth0 -m state --state RELATED,ESTABLISHED -d 192.168.1.0/24 -j ACCEPT
/sbin/iptables -A FORWARD -i eth0 -o ppp0 -j ACCEPT

# Enabling packet forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward

/Ari




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2009-10-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *