Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I am using Fedora 18 64-bit.I MASQUERADE my two NICs "em1" and "vmnet1".My Guest machines using "vmnet1" can successfully access internet. I need to run the following codes in ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2013
    Posts
    2

    Arrow Routing Configuration reset on restart.


    Hi,
    I am using Fedora 18 64-bit.I MASQUERADE my two NICs "em1" and "vmnet1".My Guest machines using "vmnet1" can successfully access internet. I need to run the following codes in terminal to do all these.
    But the problem is every time I reboot I need to run the commands again. What shall I do?
    [@Rumata I edited my post hope it will more easy to understand my problem.]

    Code:
    iptables --flush
    iptables --table nat --flush
    iptables --delete-chain
    iptables --table nat --delete-chain
    iptables --table nat --append POSTROUTING --out-interface em1 -j MASQUERADE
    iptables --append FORWARD --in-interface vmnet1 -j ACCEPT
    echo 1 > /proc/sys/net/ipv4/ip_forward
    -Thank you.
    Last edited by Generator; 02-13-2013 at 07:54 AM.

  2. #2
    Just Joined!
    Join Date
    Feb 2013
    Location
    USSR
    Posts
    15
    I don't think that I understand you correctly, but you might want to read about iptables-save & iptables-restore

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •