Alliance SIKHT (ex CDA) Index du Forum Alliance SIKHT (ex CDA)
Rejoignez la rébellion ...
 
 FAQFAQ  S'enregistrerS'enregistrer 
 ConnexionConnexion 

string(31) "Unable to connect to SQL host: "
Using Ubuntu 12.04 as router firewall Nimmis Worl

 
Poster un nouveau sujet   Répondre au sujet    Alliance SIKHT (ex CDA) Index du Forum -> Taverne PUBLIC
Voir le sujet précédent :: Voir le sujet suivant  
Auteur Message
gaeajaree



Inscrit le: 19 Juin 2013
Messages: 5
Localisation: England

MessagePosté le: Lun 24 Juin 2013, 23:04    Sujet du message: Using Ubuntu 12.04 as router firewall Nimmis Worl Répondre en citant

sudo cp /etc/network/interfaces /etc/network/interfaces.bak
adding net for 2nd interface eth1
add the following information to /etc/network/interfaces
# Set up the internal wired network## Don't forget to change eth1 to the proper name of the internal# wired network interface if applicable.#auto eth1iface eth1 inet static address 192.168.0.1 network 192.168.0.0 netmask 255.255.255.0 broadcast 192.168.0.255
restart network with
sudo /etc/init.d/networking restart
Setup dhcp server for local network
sudo apt-get install dhcp3-server
inte the file /etc/dhcp/dhcpd.conf insert the following
authoritative;option domain-name "mydomain";option domain-name-servers 8.8.8.8, 8.8.4.4, 192.168.0.1;default-lease-time 600;max-lease-time 7200;option subnet-mask 255.255.255.0;option broadcast-address 192.168.0.255;option routers 192.168.0.1;subnet 192.168.0.0 netmask 255.255.255.0 { range 192.168.0.32 192.168.0.128 ; ?option routers 192.168.0.1 ;}
then edit /etc/default/isc-dhcp-server
INTERFACES="eth1"
then restart dhcp server
sudo service isc-dhcp-server restart
Setting up the firewall
Be sure that ufw is installed on the system
sudo apt-get install ufw
edit the file?/etc/default/ufw and change the line
DEFAULT_FORWARD_POLICY="DROP"
so it reads
DEFAULT_FORWARD_POLICY="ACCEPT"
then we need to enable packet forward between the interfaces
edit the file,CHRISTIAN LOUBOUTIN SANDALS?/etc/ufw/sysctl,CHRISTIAN LOUBOUTIN FLAT.conf and remove the # infront of the line below so it reads
net/ipv4/ip_forward=1
One final file to change before we are upp and running
change the file /etc/ufw/before.rules?add these line in the top before any commands
# nat rules*nat OSTROUTING ACCEPT [0:0]# Forward all packes through eth0-A POSTROUTING -s 192.168.100.0/24 -o eth0 -j MASQUERADE# WARNING, do not remove COMMIT line. This breaks the loadingCOMMIT
Before starting the firewall, if you want to be able to access it with ssh you need to enable a rule accepting connections on port 22
ufw allow 22
Then start it up
ufw disable &&amp,CHRISTIAN LOUBOUTIN PLATFORMS; sudo ufw enable
Revenir en haut
Voir le profil de l'utilisateur gaeajaree is offline  Envoyer un message privé Visiter le site web du posteur
Montrer les messages depuis:   
Poster un nouveau sujet   Répondre au sujet    Alliance SIKHT (ex CDA) Index du Forum -> Taverne PUBLIC Toutes les heures sont au format GMT + 2 Heures
Page 1 sur 1

 
Sauter vers:  
Vous ne pouvez pas poster de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas voter dans les sondages de ce forum


Powered by phpBB © 2001, 2005 phpBB Group
Traduction par : phpBB-fr.com