From: Sicness <ctolbhuk@gmail.com> To: Saratov Linux User Group Maillist <sarlug@lists.lug.ru> Subject: Re: [Sarlug] NAT на 2 if Date: Tue, 08 Dec 2009 12:44:52 +0300 Message-ID: <4B1E2014.3020607@gmail.com> (raw) In-Reply-To: <33b333d80912080138xa10f2bfge88d234e528c2e17@mail.gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Спасибо Лиану. Результат примерно такой: #!/bin/sh iptables -F iptables -t nat -F # enable masquerading iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE # enable ip_forwarding echo 1 > /proc/sys/net/ipv4/ip_forward ... iptables -A FORWARD -s 192.168.0.38 -i eth0 -o ppp0 -j ACCEPT iptables -A FORWARD -d 192.168.0.38 -i ppp0 -o eth0 -j ACCEPT iptables -A FORWARD -s 192.168.0.38 -i eth0 -o eth1 -j ACCEPT iptables -A FORWARD -d 192.168.0.38 -i eth1 -o eth0 -j ACCEPT где конечно на сервере прописаны пути (route) Более или менее очевидно :) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iJwEAQECAAYFAkseIBQACgkQ5jgWcLqRXldAmQP/YpG9+FIVriP8uO8HRsPjgaBY 0Wko1Kucou4FuX2voMfry2fmkoL3kHbNije60Ikd62EExGgu76wBGHVuya6YJP/l FobT1ZkrE28VZHfApJSL81rjR8lnuTXJh6NhKPDMzD5IWk2q6ayy50uNYrz4tEy7 YF6qnvDUbq1lD3UrTA4= =dZrt -----END PGP SIGNATURE-----
prev parent reply other threads:[~2009-12-08 9:44 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-12-08 9:17 Sicness 2009-12-08 9:22 ` Яков Попов 2009-12-08 9:44 ` Sicness [this message]
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4B1E2014.3020607@gmail.com \ --to=ctolbhuk@gmail.com \ --cc=sarlug@lists.lug.ru \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Saratov Linux User Group This inbox may be cloned and mirrored by anyone: git clone --mirror http://lore.altlinux.org/sarlug/0 sarlug/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 sarlug sarlug/ http://lore.altlinux.org/sarlug \ sarlug@lists.lug.ru sarlug@lug.ru public-inbox-index sarlug Example config snippet for mirrors. Newsgroup available over NNTP: nntp://lore.altlinux.org/org.altlinux.lists.sarlug AGPL code for this site: git clone https://public-inbox.org/public-inbox.git